publ-echo-test 0.0.226 → 0.0.228
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.
@@ -147,9 +147,6 @@ var GridItem = function (_a) {
|
|
147
147
|
if (isNaN(minWidth) || isNaN(minHeight)) {
|
148
148
|
return;
|
149
149
|
}
|
150
|
-
var height = isSizeChanged
|
151
|
-
? mutation.target.parentNode.clientHeight
|
152
|
-
: mutation.target.clientHeight;
|
153
150
|
var width = targetNode.clientWidth;
|
154
151
|
if (!isSizeChanged && mutation.target instanceof Element) {
|
155
152
|
var styles = getComputedStyle(mutation.target);
|
@@ -229,12 +226,13 @@ var GridItem = function (_a) {
|
|
229
226
|
if (prevH > h) {
|
230
227
|
h = prevH;
|
231
228
|
}
|
229
|
+
console.log('prevH:', prevH, 'h:', h, 'prevW:', prevW, 'w:', w);
|
232
230
|
if (prevH === h && prevW === w) {
|
233
231
|
return;
|
234
232
|
}
|
235
233
|
props.onFitToContent &&
|
236
234
|
props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: false });
|
237
|
-
}, [isSelected, autoResize]);
|
235
|
+
}, [isSelected, autoResize, props.onFitToContent]);
|
238
236
|
// const moveDroppingItem = (prevProps: GridItemProps) => {
|
239
237
|
// const { droppingPosition } = props;
|
240
238
|
// if (!droppingPosition) return;
|
@@ -91,8 +91,6 @@ var Resizable = function (_a) {
|
|
91
91
|
var columnGap = Number(target.getAttribute('data-column-gap'));
|
92
92
|
var compositionCols = Number(oneComposition.getAttribute('data-cols'));
|
93
93
|
var compositionRows = Number(oneComposition.getAttribute('data-rows'));
|
94
|
-
// const compositionRowHeight = Number(oneComposition.getAttribute('data-row-height')!);
|
95
|
-
// const compositionColWidth = Number(oneComposition.getAttribute('data-col-width')!);
|
96
94
|
var oneCompositionMinWidth = minCellWidth * compositionCols + 20 /* 20px padding */;
|
97
95
|
var oneCompositionMinHeight = minCollHeight * compositionRows + 20 /* 20px padding */;
|
98
96
|
var styles = getComputedStyle(target);
|
@@ -105,6 +103,7 @@ var Resizable = function (_a) {
|
|
105
103
|
var listMinWidth = oneCompositionMinWidth * numberOfColumns + (numberOfColumns - 1) * columnGap + paddingLR;
|
106
104
|
var numberOfRows = Math.ceil(numberOfItems / numberOfColumns);
|
107
105
|
var listMinHeight = oneCompositionMinHeight * numberOfRows + (numberOfRows - 1) * rowGap + paddingTB;
|
106
|
+
console.log('listMinHeight', listMinHeight, 'listMinWidth', listMinWidth);
|
108
107
|
minWidth.current = listMinWidth;
|
109
108
|
minHeight.current = listMinHeight;
|
110
109
|
return;
|