mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Add similar refPoint validity check to zoomBy
This commit is contained in:
parent
fd85ee4f4e
commit
ae5acb6547
@ -536,7 +536,7 @@ $.Viewport.prototype = {
|
|||||||
* @return {OpenSeadragon.Viewport} Chainable.
|
* @return {OpenSeadragon.Viewport} Chainable.
|
||||||
*/
|
*/
|
||||||
zoomBy: function( factor, refPoint, immediately ) {
|
zoomBy: function( factor, refPoint, immediately ) {
|
||||||
if( refPoint ) {
|
if (refPoint instanceof $.Point && !isNaN(refPoint.x) && !isNaN(refPoint.y)) {
|
||||||
refPoint = refPoint.rotate(
|
refPoint = refPoint.rotate(
|
||||||
-this.degrees,
|
-this.degrees,
|
||||||
new $.Point( this.centerSpringX.target.value, this.centerSpringY.target.value )
|
new $.Point( this.centerSpringX.target.value, this.centerSpringY.target.value )
|
||||||
|
Loading…
Reference in New Issue
Block a user