mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
[=] Dropped useless calculations
This commit is contained in:
parent
2bcc1aa0f4
commit
ecebc3305f
@ -345,13 +345,11 @@ $.TileSource.prototype = {
|
|||||||
* @param {OpenSeadragon.Point} point
|
* @param {OpenSeadragon.Point} point
|
||||||
*/
|
*/
|
||||||
getTileAtPoint: function( level, point ) {
|
getTileAtPoint: function( level, point ) {
|
||||||
var levelScale = this.getLevelScale( level ),
|
var numTiles = this.getNumTiles( level );
|
||||||
numTiles = this.getNumTiles( level ),
|
return new $.Point(
|
||||||
pixel = point.times( this.dimensions.x * levelScale ),
|
Math.floor( (point.x * numTiles.x) / 1 ),
|
||||||
tx = Math.floor( (pixel.x * numTiles.x) / (this.dimensions.x * levelScale) ),
|
Math.floor( (point.y * numTiles.y * this.dimensions.x) / this.dimensions.y )
|
||||||
ty = Math.floor( (pixel.y * numTiles.y) / (this.dimensions.y * levelScale) );
|
);
|
||||||
|
|
||||||
return new $.Point( tx, ty );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user