Use correct method for imageToWindowCoordinates

This commit is contained in:
superbland 2021-11-04 19:43:59 +00:00
parent 57e97019d9
commit 446382f5a1

View File

@ -423,8 +423,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* @returns {OpenSeadragon.Point} The TiledImage's content size, in window coordinates. * @returns {OpenSeadragon.Point} The TiledImage's content size, in window coordinates.
*/ */
getSizeInWindowCoordinates: function() { getSizeInWindowCoordinates: function() {
var topLeft = this.viewport.imageToWindowCoordinates(new $.Point(0, 0)); var topLeft = this.imageToWindowCoordinates(new $.Point(0, 0));
var bottomRight = this.viewport.imageToWindowCoordinates(this.getContentSize()); var bottomRight = this.imageToWindowCoordinates(this.getContentSize());
return new $.Point(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); return new $.Point(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
}, },