[=] Dropped useless calculations

This commit is contained in:
VoidVolker 2016-07-29 12:41:25 +03:00
parent 2bcc1aa0f4
commit ecebc3305f

View File

@ -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 );
}, },
/** /**