From 446382f5a17202d9a8a01b03c8edd6b6ef2ca189 Mon Sep 17 00:00:00 2001 From: superbland Date: Thu, 4 Nov 2021 19:43:59 +0000 Subject: [PATCH] Use correct method for imageToWindowCoordinates --- src/tiledimage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 8145a4d3..95ac4f3c 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -423,8 +423,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag * @returns {OpenSeadragon.Point} The TiledImage's content size, in window coordinates. */ getSizeInWindowCoordinates: function() { - var topLeft = this.viewport.imageToWindowCoordinates(new $.Point(0, 0)); - var bottomRight = this.viewport.imageToWindowCoordinates(this.getContentSize()); + var topLeft = this.imageToWindowCoordinates(new $.Point(0, 0)); + var bottomRight = this.imageToWindowCoordinates(this.getContentSize()); return new $.Point(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); },