mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-28 08:06:08 +03:00
bugfix in getCenter during zoom animation
This commit is contained in:
parent
86c105beaa
commit
37a024f023
@ -578,7 +578,7 @@ $.Viewport.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var constraintApplied = xConstrained || yConstrained;
|
var constraintApplied = xConstrained || yConstrained;
|
||||||
var newViewportBounds = constraintApplied ? this.viewerElementToViewportRectangle(newBounds, false) : bounds.clone();
|
var newViewportBounds = constraintApplied ? this.viewerElementToViewportRectangle(newBounds) : bounds.clone();
|
||||||
newViewportBounds.xConstrained = xConstrained;
|
newViewportBounds.xConstrained = xConstrained;
|
||||||
newViewportBounds.yConstrained = yConstrained;
|
newViewportBounds.yConstrained = yConstrained;
|
||||||
newViewportBounds.constraintApplied = constraintApplied;
|
newViewportBounds.constraintApplied = constraintApplied;
|
||||||
@ -811,7 +811,6 @@ $.Viewport.prototype = {
|
|||||||
constrainedBounds;
|
constrainedBounds;
|
||||||
|
|
||||||
bounds = this.getBounds(current);
|
bounds = this.getBounds(current);
|
||||||
// bounds = this.getBoundsNoRotate(current);
|
|
||||||
|
|
||||||
constrainedBounds = this._applyBoundaryConstraints(bounds);
|
constrainedBounds = this._applyBoundaryConstraints(bounds);
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@ setTimeout(() => viewport.applyConstraints(), 1000);</pre>
|
|||||||
maxZoomPixelRatio: 10,
|
maxZoomPixelRatio: 10,
|
||||||
visibilityRatio:1,
|
visibilityRatio:1,
|
||||||
constrainDuringPan:true,
|
constrainDuringPan:true,
|
||||||
// showNavigationControl:false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
viewer.addHandler("open", function(event) {
|
viewer.addHandler("open", function(event) {
|
||||||
@ -148,29 +147,8 @@ setTimeout(() => viewport.applyConstraints(), 1000);</pre>
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
viewer.viewport.zoomTo(1/2, null, true);
|
viewer.viewport.zoomTo(0.5, null, true);
|
||||||
|
|
||||||
// viewer.viewport.panBy(new OpenSeadragon.Point(0.5, 0.5).minus(viewer.viewport.pointFromPixel(new OpenSeadragon.Point(0, 0))))
|
|
||||||
// setTimeout(()=>viewer.viewport.contentCoords(),1500);
|
|
||||||
// // setTimeout(()=>{
|
|
||||||
// // viewer.viewport.rotateBy(-90, new OpenSeadragon.Point(0.5, 0.5));
|
|
||||||
// // console.log('Rotated by -90')
|
|
||||||
// // viewer.viewport.contentCoords();
|
|
||||||
// // setTimeout(()=>{
|
|
||||||
// // console.log('After rotation');
|
|
||||||
// // viewer.viewport.contentCoords();
|
|
||||||
// // },1500);
|
|
||||||
// // }, 2000)
|
|
||||||
|
|
||||||
// setTimeout(()=>{
|
|
||||||
// viewer.viewport.zoomBy(2, new OpenSeadragon.Point(0.5, 0.5));
|
|
||||||
// console.log('Zoomed by 2')
|
|
||||||
// viewer.viewport.contentCoords();
|
|
||||||
// setTimeout(()=>{
|
|
||||||
// console.log('After zoom');
|
|
||||||
// viewer.viewport.contentCoords();
|
|
||||||
// },1500);
|
|
||||||
// }, 4500)
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$('.method').on('click',function(){
|
$('.method').on('click',function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user