mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
commit
6f6207412c
@ -166,14 +166,6 @@
|
||||
return new $.Point(0, 0);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @function
|
||||
* @param {Number} level
|
||||
* @param {OpenSeadragon.Point} point
|
||||
*/
|
||||
getTileAtPoint: function (level, point) {
|
||||
return new $.Point(0, 0);
|
||||
},
|
||||
/**
|
||||
* Retrieves a tile url
|
||||
* @function
|
||||
|
@ -169,16 +169,6 @@ $.extend( $.LegacyTileSource.prototype, $.TileSource.prototype, /** @lends OpenS
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @param {Number} level
|
||||
* @param {OpenSeadragon.Point} point
|
||||
*/
|
||||
getTileAtPoint: function( level, point ) {
|
||||
return new $.Point( 0, 0 );
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* This method is not implemented by this class other than to throw an Error
|
||||
* announcing you have to implement it. Because of the variety of tile
|
||||
|
@ -967,10 +967,14 @@ function updateLevel( tiledImage, haveDrawn, drawLevel, level, levelOpacity, lev
|
||||
|
||||
resetCoverage( tiledImage.coverage, level );
|
||||
|
||||
if ( !tiledImage.wrapHorizontal ) {
|
||||
if ( tiledImage.wrapHorizontal ) {
|
||||
tileTL.x -= 1; // left invisible column (othervise we will have empty space after scroll at left)
|
||||
} else {
|
||||
tileBR.x = Math.min( tileBR.x, numberOfTiles.x - 1 );
|
||||
}
|
||||
if ( !tiledImage.wrapVertical ) {
|
||||
if ( tiledImage.wrapVertical ) {
|
||||
tileTL.y -= 1; // top invisible row (othervise we will have empty space after scroll at top)
|
||||
} else {
|
||||
tileBR.y = Math.min( tileBR.y, numberOfTiles.y - 1 );
|
||||
}
|
||||
|
||||
|
@ -345,11 +345,11 @@ $.TileSource.prototype = {
|
||||
* @param {OpenSeadragon.Point} point
|
||||
*/
|
||||
getTileAtPoint: function( level, point ) {
|
||||
var pixel = point.times( this.dimensions.x ).times( this.getLevelScale(level) ),
|
||||
tx = Math.floor( pixel.x / this.getTileWidth(level) ),
|
||||
ty = Math.floor( pixel.y / this.getTileHeight(level) );
|
||||
|
||||
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