mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Revert "apply only zoom constraint by default for scroll events"
This reverts commit a6d1472134
.
This commit is contained in:
parent
a6d1472134
commit
7d6437b2cd
@ -3371,7 +3371,7 @@ function onCanvasScroll( event ) {
|
||||
factor,
|
||||
gestureSettings.zoomToRefPoint ? this.viewport.pointFromPixel( event.position, true ) : null
|
||||
);
|
||||
this.viewport.applyZoomConstraints();
|
||||
this.viewport.applyConstraints();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -591,25 +591,6 @@ $.Viewport.prototype = {
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Enforces the minZoom, maxZoom constraints by zooming to the closest acceptable zoom.
|
||||
* @function
|
||||
* @param {Boolean} [immediately=false]
|
||||
* @return {OpenSeadragon.Viewport} Chainable.
|
||||
* @fires OpenSeadragon.Viewer.event:constrain
|
||||
*/
|
||||
applyZoomConstraints: function(immediately) {
|
||||
var actualZoom = this.getZoom();
|
||||
var constrainedZoom = this._applyZoomConstraints(actualZoom);
|
||||
|
||||
if (actualZoom !== constrainedZoom) {
|
||||
this.zoomTo(constrainedZoom, this.zoomPoint, immediately);
|
||||
}
|
||||
|
||||
this._raiseConstraintsEvent(immediately);
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Equivalent to {@link OpenSeadragon.Viewport#applyConstraints}
|
||||
* @function
|
||||
|
Loading…
Reference in New Issue
Block a user