mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 08:36:10 +03:00
Use self instead of _this.
This commit is contained in:
parent
3e56092445
commit
e10eced7d0
@ -322,12 +322,12 @@ $.Drawer.prototype = /** @lends OpenSeadragon.Drawer.prototype */{
|
|||||||
// will have the same size as the main canvas. However, if
|
// will have the same size as the main canvas. However, if
|
||||||
// the viewport get rotated later on, we will need to resize it.
|
// the viewport get rotated later on, we will need to resize it.
|
||||||
if (this.viewport.getRotation() === 0) {
|
if (this.viewport.getRotation() === 0) {
|
||||||
var _this = this;
|
var self = this;
|
||||||
this.viewer.addHandler('rotate', function resizeSketchCanvas() {
|
this.viewer.addHandler('rotate', function resizeSketchCanvas() {
|
||||||
_this.viewer.removeHandler('rotate', resizeSketchCanvas);
|
self.viewer.removeHandler('rotate', resizeSketchCanvas);
|
||||||
var sketchCanvasSize = _this._calculateSketchCanvasSize();
|
var sketchCanvasSize = self._calculateSketchCanvasSize();
|
||||||
_this.sketchCanvas.width = sketchCanvasSize.x;
|
self.sketchCanvas.width = sketchCanvasSize.x;
|
||||||
_this.sketchCanvas.height = sketchCanvasSize.y;
|
self.sketchCanvas.height = sketchCanvasSize.y;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user