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