2301 - Add rounding (#11)
This commit is contained in:
Vendored
+3
@@ -723,6 +723,9 @@ var DragHandle = function (handler) {
|
|||||||
heightToDisplay -= unit == 'inch' ? doubleRealFrameWidth / 2.54 : doubleRealFrameWidth;
|
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 = {
|
this.__handles = {
|
||||||
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
|
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
|
||||||
y: getRect(heightToDisplay + ' ' + unit, handleHeight)
|
y: getRect(heightToDisplay + ' ' + unit, handleHeight)
|
||||||
|
|||||||
@@ -123,6 +123,9 @@ var DragHandle = function (handler) {
|
|||||||
heightToDisplay -= unit == 'inch' ? doubleRealFrameWidth / 2.54 : doubleRealFrameWidth;
|
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 = {
|
this.__handles = {
|
||||||
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
|
x: getRect(widthToDisplay + ' ' + unit, handleWidth),
|
||||||
y: getRect(heightToDisplay + ' ' + unit, handleHeight)
|
y: getRect(heightToDisplay + ' ' + unit, handleHeight)
|
||||||
|
|||||||
Reference in New Issue
Block a user