We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bcba053 + 4547e58 commit d8d4f2aCopy full SHA for d8d4f2a
1 file changed
src/display/editor/editor.js
@@ -1006,15 +1006,14 @@ class AnnotationEditor {
1006
);
1007
} else if (isHorizontal) {
1008
ratioX =
1009
- Math.max(
1010
- minWidth,
1011
- Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))
1012
- ) / savedWidth;
+ MathClamp(Math.abs(oppositePoint[0] - point[0] - deltaX), minWidth, 1) /
+ savedWidth;
1013
} else {
1014
ratioY =
1015
+ MathClamp(
+ Math.abs(oppositePoint[1] - point[1] - deltaY),
1016
minHeight,
1017
- Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))
+ 1
1018
) / savedHeight;
1019
}
1020
0 commit comments