From e10eced7d0e24889e56b62aefcf202c539103c33 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Tue, 26 Jan 2016 19:30:09 -0500 Subject: [PATCH] Use self instead of _this. --- src/drawer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drawer.js b/src/drawer.js index dec61096..132efe68 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -322,12 +322,12 @@ $.Drawer.prototype = /** @lends OpenSeadragon.Drawer.prototype */{ // will have the same size as the main canvas. However, if // the viewport get rotated later on, we will need to resize it. if (this.viewport.getRotation() === 0) { - var _this = this; + var self = this; this.viewer.addHandler('rotate', function resizeSketchCanvas() { - _this.viewer.removeHandler('rotate', resizeSketchCanvas); - var sketchCanvasSize = _this._calculateSketchCanvasSize(); - _this.sketchCanvas.width = sketchCanvasSize.x; - _this.sketchCanvas.height = sketchCanvasSize.y; + self.viewer.removeHandler('rotate', resizeSketchCanvas); + var sketchCanvasSize = self._calculateSketchCanvasSize(); + self.sketchCanvas.width = sketchCanvasSize.x; + self.sketchCanvas.height = sketchCanvasSize.y; }); } }