diff --git a/dist/image-editor.js b/dist/image-editor.js index a5f460d..9f1dfd2 100644 --- a/dist/image-editor.js +++ b/dist/image-editor.js @@ -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) diff --git a/src/DragHandle.js b/src/DragHandle.js index 2b70243..f4e6e5c 100644 --- a/src/DragHandle.js +++ b/src/DragHandle.js @@ -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)