mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Rename method, update logic
This commit is contained in:
parent
45bdd87224
commit
92bcfa5416
@ -420,10 +420,12 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns {OpenSeadragon.Point} The dimensions of the image as it would be currently rendered in the viewport
|
||||
* @returns {OpenSeadragon.Point} The TiledImage's content size, in window coordinates.
|
||||
*/
|
||||
getRelativeSize: function() {
|
||||
return this.getContentSize().times(this.viewport.getZoom());
|
||||
getSizeInWindowCoordinates: function() {
|
||||
var topLeft = this.viewport.imageToWindowCoordinates(new $.Point(0, 0));
|
||||
var bottomRight = this.viewport.imageToWindowCoordinates(this.getContentSize());
|
||||
return new $.Point(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
|
||||
},
|
||||
|
||||
// private
|
||||
|
Loading…
Reference in New Issue
Block a user