Use the MathClamp helper function more in the web/ folder (PR 19617 follow-up)
There's one more spot that I missed in PR 19617.
This commit is contained in:
parent
efc5c3c231
commit
af3d13c22d
@ -32,6 +32,7 @@ import {
|
||||
AnnotationEditorType,
|
||||
AnnotationEditorUIManager,
|
||||
AnnotationMode,
|
||||
MathClamp,
|
||||
PermissionFlag,
|
||||
PixelsPerInch,
|
||||
shadow,
|
||||
@ -2294,7 +2295,7 @@ class PDFViewer {
|
||||
newScale = round((newScale * delta).toFixed(2) * 10) / 10;
|
||||
} 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 });
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user