diff --git a/src/viewer.js b/src/viewer.js index a1f965f8..ab779142 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -3371,7 +3371,7 @@ function onCanvasScroll( event ) { factor, gestureSettings.zoomToRefPoint ? this.viewport.pointFromPixel( event.position, true ) : null ); - this.viewport.applyZoomConstraints(); + this.viewport.applyConstraints(); } } diff --git a/src/viewport.js b/src/viewport.js index a8a53fa2..be350af9 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -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