mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Merge branch 'master' of https://github.com/openseadragon/openseadragon
This commit is contained in:
commit
913844b82b
@ -18,6 +18,8 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* IIIFTileSources will now respect non-square tiles if available.
|
* IIIFTileSources will now respect non-square tiles if available.
|
||||||
* Added XDomainRequest as fallback method for ajax requests if XMLHttpRequest fails (for IE < 10) (#693)
|
* Added XDomainRequest as fallback method for ajax requests if XMLHttpRequest fails (for IE < 10) (#693)
|
||||||
* Now avoiding using eval when JSON.parse is available (#696)
|
* Now avoiding using eval when JSON.parse is available (#696)
|
||||||
|
* Rotation now works properly on retina display (#708)
|
||||||
|
* Added option in addTiledImage to replace tiledImage at index (#706)
|
||||||
|
|
||||||
2.0.0:
|
2.0.0:
|
||||||
|
|
||||||
|
@ -488,29 +488,18 @@ $.Drawer.prototype = /** @lends OpenSeadragon.Drawer.prototype */{
|
|||||||
// private
|
// private
|
||||||
_offsetForRotation: function( tile, degrees, useSketch ){
|
_offsetForRotation: function( tile, degrees, useSketch ){
|
||||||
var cx = this.canvas.width / 2,
|
var cx = this.canvas.width / 2,
|
||||||
cy = this.canvas.height / 2,
|
cy = this.canvas.height / 2;
|
||||||
px = tile.position.x - cx,
|
|
||||||
py = tile.position.y - cy;
|
|
||||||
|
|
||||||
var context = this._getContext( useSketch );
|
var context = this._getContext( useSketch );
|
||||||
context.save();
|
context.save();
|
||||||
|
|
||||||
context.translate(cx, cy);
|
context.translate(cx, cy);
|
||||||
context.rotate( Math.PI / 180 * degrees);
|
context.rotate( Math.PI / 180 * degrees);
|
||||||
tile.position.x = px;
|
context.translate(-cx, -cy);
|
||||||
tile.position.y = py;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// private
|
// private
|
||||||
_restoreRotationChanges: function( tile, useSketch ){
|
_restoreRotationChanges: function( tile, useSketch ){
|
||||||
var cx = this.canvas.width / 2,
|
|
||||||
cy = this.canvas.height / 2,
|
|
||||||
px = tile.position.x + cx,
|
|
||||||
py = tile.position.y + cy;
|
|
||||||
|
|
||||||
tile.position.x = px;
|
|
||||||
tile.position.y = py;
|
|
||||||
|
|
||||||
var context = this._getContext( useSketch );
|
var context = this._getContext( useSketch );
|
||||||
context.restore();
|
context.restore();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user