Merge pull request #19868 from Snuffleupagus/MathClamp-4
Use the `MathClamp` helper function more in the `web/` folder (PR 19617 follow-up)
This commit is contained in:
commit
c2d88540b4
@ -32,6 +32,7 @@ import {
|
|||||||
AnnotationEditorType,
|
AnnotationEditorType,
|
||||||
AnnotationEditorUIManager,
|
AnnotationEditorUIManager,
|
||||||
AnnotationMode,
|
AnnotationMode,
|
||||||
|
MathClamp,
|
||||||
PermissionFlag,
|
PermissionFlag,
|
||||||
PixelsPerInch,
|
PixelsPerInch,
|
||||||
shadow,
|
shadow,
|
||||||
@ -2294,7 +2295,7 @@ class PDFViewer {
|
|||||||
newScale = round((newScale * delta).toFixed(2) * 10) / 10;
|
newScale = round((newScale * delta).toFixed(2) * 10) / 10;
|
||||||
} while (--steps > 0);
|
} while (--steps > 0);
|
||||||
}
|
}
|
||||||
newScale = Math.max(MIN_SCALE, Math.min(MAX_SCALE, newScale));
|
newScale = MathClamp(newScale, MIN_SCALE, MAX_SCALE);
|
||||||
this.#setScale(newScale, { noScroll: false, drawingDelay, origin });
|
this.#setScale(newScale, { noScroll: false, drawingDelay, origin });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user