]> git.parisson.com Git - pdf.js.git/commitdiff
Addressing reviewer comments
authorArtur Adib <arturadib@gmail.com>
Thu, 16 Feb 2012 17:02:18 +0000 (12:02 -0500)
committerArtur Adib <arturadib@gmail.com>
Thu, 16 Feb 2012 17:02:18 +0000 (12:02 -0500)
src/core.js

index 9a8f516d7b5a7e5c69e0ca1b3e691559bd90774a..137452257e3d4db0363c290823800db0442c4ee9 100644 (file)
@@ -112,7 +112,7 @@ var Page = (function PageClosure() {
         height: this.height
       };
       if (!isArray(cropBox) || cropBox.length !== 4)
-        return shadow(this, 'cropBox', view);
+        return shadow(this, 'view', view);
 
       var mediaBox = this.mediaBox;
       var offsetX = mediaBox[0], offsetY = mediaBox[1];
@@ -123,7 +123,7 @@ var Page = (function PageClosure() {
       // effectively reduced to their intersection with the media box."
       cropBox = Util.intersect(cropBox, mediaBox);
       if (!cropBox)
-        return shadow(this, 'cropBox', view);
+        return shadow(this, 'view', view);
 
       var tl = this.rotatePoint(cropBox[0] - offsetX, cropBox[1] - offsetY);
       var br = this.rotatePoint(cropBox[2] - offsetX, cropBox[3] - offsetY);
@@ -132,7 +132,7 @@ var Page = (function PageClosure() {
       view.width = Math.abs(tl.x - br.x);
       view.height = Math.abs(tl.y - br.y);
 
-      return shadow(this, 'cropBox', view);
+      return shadow(this, 'view', view);
     },
     get annotations() {
       return shadow(this, 'annotations', this.inheritPageProp('Annots'));