mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-19 16:23:13 +03:00
add minPixelRatio guard back in; fix tabs and spaces in comments'
This commit is contained in:
parent
f7c12a716b
commit
65d30e7ce1
@ -72,8 +72,8 @@
|
|||||||
* @param {Boolean} [options.iOSDevice] - See {@link OpenSeadragon.Options}.
|
* @param {Boolean} [options.iOSDevice] - See {@link OpenSeadragon.Options}.
|
||||||
* @param {Number} [options.opacity=1] - Set to draw at proportional opacity. If zero, images will not draw.
|
* @param {Number} [options.opacity=1] - Set to draw at proportional opacity. If zero, images will not draw.
|
||||||
* @param {Boolean} [options.preload=false] - Set true to load even when the image is hidden by zero opacity.
|
* @param {Boolean} [options.preload=false] - Set true to load even when the image is hidden by zero opacity.
|
||||||
* @param {String} [options.compositeOperation] - How the image is composited onto other images; see compositeOperation in {@link OpenSeadragon.Options} for possible
|
* @param {String} [options.compositeOperation] - How the image is composited onto other images;
|
||||||
values.
|
* see compositeOperation in {@link OpenSeadragon.Options} for possible values.
|
||||||
* @param {Boolean} [options.debugMode] - See {@link OpenSeadragon.Options}.
|
* @param {Boolean} [options.debugMode] - See {@link OpenSeadragon.Options}.
|
||||||
* @param {String|CanvasGradient|CanvasPattern|Function} [options.placeholderFillStyle] - See {@link OpenSeadragon.Options}.
|
* @param {String|CanvasGradient|CanvasPattern|Function} [options.placeholderFillStyle] - See {@link OpenSeadragon.Options}.
|
||||||
* @param {String|Boolean} [options.crossOriginPolicy] - See {@link OpenSeadragon.Options}.
|
* @param {String|Boolean} [options.crossOriginPolicy] - See {@link OpenSeadragon.Options}.
|
||||||
@ -1359,6 +1359,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
// We are iterating from highest resolution to lowest resolution
|
// We are iterating from highest resolution to lowest resolution
|
||||||
// Once a level fully covers the viewport the loop is halted and
|
// Once a level fully covers the viewport the loop is halted and
|
||||||
// lower-resolution levels are skipped
|
// lower-resolution levels are skipped
|
||||||
|
let useLevel = false;
|
||||||
for (let i = 0; i < levelList.length; i++) {
|
for (let i = 0; i < levelList.length; i++) {
|
||||||
let level = levelList[i];
|
let level = levelList[i];
|
||||||
|
|
||||||
@ -1367,6 +1368,14 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
|||||||
true
|
true
|
||||||
).x * this._scaleSpring.current.value;
|
).x * this._scaleSpring.current.value;
|
||||||
|
|
||||||
|
// make sure we skip levels until currentRenderPixelRatio becomes >= minPixelRatio
|
||||||
|
// but always use the last level in the list so we draw something
|
||||||
|
if (i === levelList.length - 1 || currentRenderPixelRatio >= this.minPixelRatio ) {
|
||||||
|
useLevel = true;
|
||||||
|
} else if (!useLevel) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var targetRenderPixelRatio = this.viewport.deltaPixelsFromPointsNoRotate(
|
var targetRenderPixelRatio = this.viewport.deltaPixelsFromPointsNoRotate(
|
||||||
this.source.getPixelRatio(level),
|
this.source.getPixelRatio(level),
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user