mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-04-18 00:20:59 +00:00
fix panBy immediately with non-zero spring
This commit is contained in:
parent
99fcb408fe
commit
e5175188c5
1 changed files with 8 additions and 4 deletions
|
@ -827,10 +827,14 @@ $.Viewport.prototype = {
|
|||
* @fires OpenSeadragon.Viewer.event:pan
|
||||
*/
|
||||
panBy: function( delta, immediately ) {
|
||||
var center = new $.Point(
|
||||
this.centerSpringX.target.value,
|
||||
this.centerSpringY.target.value
|
||||
);
|
||||
var center = new $.Point();
|
||||
if (immediately) {
|
||||
center.x = this.centerSpringX.current.value;
|
||||
center.y = this.centerSpringY.current.value;
|
||||
} else {
|
||||
center.x = this.centerSpringX.target.value;
|
||||
center.y = this.centerSpringY.target.value;
|
||||
}
|
||||
return this.panTo( center.plus( delta ), immediately );
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue