2301 - Add rounding (#11)

This commit is contained in:
Anders Gustafsson
2022-03-24 12:19:19 +01:00
committed by GitHub
parent ec81c5dd3a
commit 96b4064986
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -723,6 +723,9 @@ var DragHandle = function (handler) {
heightToDisplay -= unit == 'inch' ? doubleRealFrameWidth / 2.54 : doubleRealFrameWidth;
}
widthToDisplay = Math.round((widthToDisplay + Number.EPSILON) * 10) / 10;
heightToDisplay = Math.round((heightToDisplay + Number.EPSILON) * 10) / 10;
this.__handles = {
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
y: getRect(heightToDisplay + ' ' + unit, handleHeight)
+3
View File
@@ -123,6 +123,9 @@ var DragHandle = function (handler) {
heightToDisplay -= unit == 'inch' ? doubleRealFrameWidth / 2.54 : doubleRealFrameWidth;
}
widthToDisplay = Math.round((widthToDisplay + Number.EPSILON) * 10) / 10;
heightToDisplay = Math.round((heightToDisplay + Number.EPSILON) * 10) / 10;
this.__handles = {
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
y: getRect(heightToDisplay + ' ' + unit, handleHeight)