diff --git a/src/drawer.js b/src/drawer.js index 9440c280..73772a88 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -323,7 +323,6 @@ $.Drawer.prototype = { this.sketchCanvas.height = sketchCanvasSize.y; this.sketchContext = this.sketchCanvas.getContext( "2d" ); - // FIXME: should check if any tiled image get rotated as well. // If the viewport is not currently rotated, the sketchCanvas // will have the same size as the main canvas. However, if // the viewport get rotated later on, we will need to resize it. @@ -621,8 +620,7 @@ $.Drawer.prototype = { // private _calculateSketchCanvasSize: function() { var canvasSize = this._calculateCanvasSize(); - if (this.viewport.getRotation() === 0 && - !this.viewer.world._hasRotatedItem()) { + if (this.viewport.getRotation() === 0) { return canvasSize; } // If the viewport is rotated, we need a larger sketch canvas in order diff --git a/src/tiledimage.js b/src/tiledimage.js index c6659c77..ca6b8eeb 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -550,20 +550,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag }, // private - // Convert rectangle in tiled image coordinates to viewport coordinates. - _tiledImageToViewportRectangle: function(rect) { - var scale = this._scaleSpring.current.value; - return new $.Rect( - rect.x * scale + this._xSpring.current.value, - rect.y * scale + this._ySpring.current.value, - rect.width * scale, - rect.height * scale, - rect.degrees) - .rotate(this.getRotation(), this._getRotationPoint(true)); - }, - - // private - // Convert rectangle in viewport coordinates to tiled image coordinates. + // Convert rectangle in viewport coordinates to this tiled image point + // coordinates (x in [0, 1] and y in [0, aspectRatio]) _viewportToTiledImageRectangle: function(rect) { var scale = this._scaleSpring.current.value; rect = rect.rotate(-this.getRotation(), this._getRotationPoint(true)); diff --git a/src/world.js b/src/world.js index ad6285d9..e68590b3 100644 --- a/src/world.js +++ b/src/world.js @@ -436,16 +436,6 @@ $.extend( $.World.prototype, $.EventSource.prototype, /** @lends OpenSeadragon.W * @property {?Object} userData - Arbitrary subscriber-defined object. */ this.raiseEvent( 'remove-item', { item: item } ); - }, - - // private - _hasRotatedItem: function() { - for (var i = 0; i < this._items.length; i++) { - if (this._items[i].getRotation() !== 0) { - return true; - } - } - return false; } });