Revert "apply only zoom constraint by default for scroll events"

This reverts commit a6d1472134.
This commit is contained in:
Joe DF 2022-05-18 10:48:58 -04:00
parent a6d1472134
commit 7d6437b2cd
2 changed files with 1 additions and 20 deletions

View File

@ -3371,7 +3371,7 @@ function onCanvasScroll( event ) {
factor, factor,
gestureSettings.zoomToRefPoint ? this.viewport.pointFromPixel( event.position, true ) : null gestureSettings.zoomToRefPoint ? this.viewport.pointFromPixel( event.position, true ) : null
); );
this.viewport.applyZoomConstraints(); this.viewport.applyConstraints();
} }
} }

View File

@ -591,25 +591,6 @@ $.Viewport.prototype = {
return this; 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} * Equivalent to {@link OpenSeadragon.Viewport#applyConstraints}
* @function * @function