mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
update flags for setMaxZoomPixelRatio
This commit is contained in:
parent
b0926b3e69
commit
4451131999
@ -1804,13 +1804,11 @@ $.Viewport.prototype = {
|
|||||||
* Sets max zoom pixel ratio
|
* Sets max zoom pixel ratio
|
||||||
* @function
|
* @function
|
||||||
* @param {Number} ratio - Max zoom pixel ratio
|
* @param {Number} ratio - Max zoom pixel ratio
|
||||||
* @param {Boolean} [constraints=false] - Apply constraints after setting ratio;
|
* @param {Boolean} [applyConstraints=true] - Apply constraints after setting ratio;
|
||||||
* Takes effect only if current zoom is greater than set max zoom pixel ratio
|
* Takes effect only if current zoom is greater than set max zoom pixel ratio
|
||||||
* @param {Boolean} [immediately=false] - Whether to animate to new zoom
|
* @param {Boolean} [immediately=false] - Whether to animate to new zoom
|
||||||
*/
|
*/
|
||||||
setMaxZoomPixelRatio: function(ratio, constraints, immediately) {
|
setMaxZoomPixelRatio: function(ratio, applyConstraints = true, immediately = false) {
|
||||||
constraints = constraints || false;
|
|
||||||
immediately = immediately || false;
|
|
||||||
|
|
||||||
$.console.assert(!isNaN(ratio), "[Viewport.setMaxZoomPixelRatio] ratio must be a number");
|
$.console.assert(!isNaN(ratio), "[Viewport.setMaxZoomPixelRatio] ratio must be a number");
|
||||||
|
|
||||||
@ -1820,7 +1818,7 @@ $.Viewport.prototype = {
|
|||||||
|
|
||||||
this.maxZoomPixelRatio = ratio;
|
this.maxZoomPixelRatio = ratio;
|
||||||
|
|
||||||
if (constraints) {
|
if (applyConstraints) {
|
||||||
if (this.getZoom() > this.getMaxZoom()) {
|
if (this.getZoom() > this.getMaxZoom()) {
|
||||||
this.applyConstraints(immediately);
|
this.applyConstraints(immediately);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user