Use the MathClamp helper function even more (PR 19617 follow-up)
There's a few more spots that I accidentally missed in PR 19617.
This commit is contained in:
parent
19b4adac03
commit
4547e582ff
@ -1006,15 +1006,14 @@ class AnnotationEditor {
|
|||||||
);
|
);
|
||||||
} else if (isHorizontal) {
|
} else if (isHorizontal) {
|
||||||
ratioX =
|
ratioX =
|
||||||
Math.max(
|
MathClamp(Math.abs(oppositePoint[0] - point[0] - deltaX), minWidth, 1) /
|
||||||
minWidth,
|
savedWidth;
|
||||||
Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))
|
|
||||||
) / savedWidth;
|
|
||||||
} else {
|
} else {
|
||||||
ratioY =
|
ratioY =
|
||||||
Math.max(
|
MathClamp(
|
||||||
|
Math.abs(oppositePoint[1] - point[1] - deltaY),
|
||||||
minHeight,
|
minHeight,
|
||||||
Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))
|
1
|
||||||
) / savedHeight;
|
) / savedHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user