publ-echo-test 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -377,12 +377,6 @@ var GridItem = function (_a) {
|
|
377
377
|
h = clamp(h, tempMinH, maxH);
|
378
378
|
setResizing(handlerName === "onResizeStop" ? undefined : size);
|
379
379
|
var _d = getResizableXYPosition(handle, w, h, prevW, prevH), newX = _d.newX, newY = _d.newY;
|
380
|
-
// NOTE: test to fix
|
381
|
-
if (handle === 'nw' || handle === 'ne' || handle === 'sw' || handle === 'se') {
|
382
|
-
if (prevH === h) {
|
383
|
-
newY = y;
|
384
|
-
}
|
385
|
-
}
|
386
380
|
handler(i, w, h, { e: e, node: node, size: size }, newX, newY);
|
387
381
|
};
|
388
382
|
var pos = calcGridItemPosition(getPositionParams(), x, y, z, w, h, {
|
@@ -58,7 +58,7 @@ export function calcWH(positionParams, _a, x, y, handleAxis, prevW, prevH, shoul
|
|
58
58
|
var colWidth = calcGridColWidth(positionParams);
|
59
59
|
var rowHeightNumber = resolveRowHeight(rowHeight, colWidth);
|
60
60
|
var roundOrCeil = shouldCeil ? Math.ceil : Math.round;
|
61
|
-
var w = roundOrCeil((width + margin[0]) / (colWidth + margin[0]));
|
61
|
+
var w = roundOrCeil(truncateToOneDecimal((width + margin[0]) / (colWidth + margin[0])));
|
62
62
|
var h = roundOrCeil(roundToOneDecimal((height + margin[1]) / (rowHeightNumber + margin[1])));
|
63
63
|
// // Capping
|
64
64
|
// w = clamp(w, 0, cols - x);
|
@@ -110,3 +110,6 @@ export function clamp(num, lowerBound, upperBound) {
|
|
110
110
|
function roundToOneDecimal(num) {
|
111
111
|
return Math.floor(num * 10) / 10;
|
112
112
|
}
|
113
|
+
function truncateToOneDecimal(num) {
|
114
|
+
return Math.floor(num * 10) / 10;
|
115
|
+
}
|
@@ -79,7 +79,7 @@ var Resizable = function (_a) {
|
|
79
79
|
shouldShrinkRef.current = true;
|
80
80
|
}
|
81
81
|
else {
|
82
|
-
extendedHeightRef.current = null
|
82
|
+
// extendedHeightRef.current = null
|
83
83
|
}
|
84
84
|
if (shouldShrinkRef.current && (target.clientHeight < elementRef.current.clientHeight)) {
|
85
85
|
extendedHeightRef.current = target.clientHeight;
|