publ-echo-test 0.0.244 → 0.0.245
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.
@@ -204,30 +204,25 @@ var GridItem = function (_a) {
|
|
204
204
|
};
|
205
205
|
}, [autoResize, isSelected, isDragging, isResizing, props.w, props.h, x, y]);
|
206
206
|
useEffect(function () {
|
207
|
-
var _a, _b, _c, _d, _e
|
207
|
+
var _a, _b, _c, _d, _e;
|
208
208
|
if (!isSelected || !autoResize) {
|
209
209
|
return;
|
210
210
|
}
|
211
211
|
var targetNode = (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0].children[0];
|
212
212
|
if (!targetNode || isDragging || isResizing) {
|
213
|
-
console.log("cancelled 1");
|
214
213
|
return;
|
215
214
|
}
|
216
215
|
if (targetNode.id !== "contentslist-box") {
|
217
|
-
console.log("cancelled 2");
|
218
216
|
return;
|
219
217
|
}
|
220
218
|
var minWidth = Number((_c = (_b = targetNode.dataset) === null || _b === void 0 ? void 0 : _b.minWidth) !== null && _c !== void 0 ? _c : 0);
|
221
219
|
var minHeight = Number((_e = (_d = targetNode.dataset) === null || _d === void 0 ? void 0 : _d.minHeight) !== null && _e !== void 0 ? _e : 0);
|
222
220
|
var insetTop = Number(targetNode.dataset.insetTop);
|
223
221
|
var insetBottom = Number(targetNode.dataset.insetBottom);
|
224
|
-
|
225
|
-
console.log(targetNode);
|
226
|
-
var _g = calcWH(getPositionParams(), {
|
222
|
+
var _f = calcWH(getPositionParams(), {
|
227
223
|
width: minWidth,
|
228
224
|
height: minHeight + insetTop + insetBottom,
|
229
|
-
}, x, y, "e", props.w, props.h, true), w =
|
230
|
-
console.log("newH, newW", h, w);
|
225
|
+
}, x, y, "e", props.w, props.h, true), w = _f.w, h = _f.h;
|
231
226
|
var prevW = props.w;
|
232
227
|
var prevH = props.h;
|
233
228
|
if (prevW > w) {
|
@@ -240,7 +235,6 @@ var GridItem = function (_a) {
|
|
240
235
|
console.log("cancelled 3");
|
241
236
|
return;
|
242
237
|
}
|
243
|
-
console.log("call onfitToContent");
|
244
238
|
props.onFitToContent &&
|
245
239
|
props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: true });
|
246
240
|
}, [isSelected]);
|
@@ -85,7 +85,6 @@ var Resizable = function (_a) {
|
|
85
85
|
minHeight.current = target.clientHeight;
|
86
86
|
}
|
87
87
|
if (isContentsList && oneComposition) {
|
88
|
-
console.log("in1");
|
89
88
|
// NOTE: 이건 좀 확인 필요. 근데 지금스팩엔 이게 맞아보임 (gap때문)
|
90
89
|
var minCellWidth = 10;
|
91
90
|
var minColHeight = 11;
|
@@ -99,26 +98,34 @@ var Resizable = function (_a) {
|
|
99
98
|
var compositionRows = Number(oneComposition.getAttribute("data-rows"));
|
100
99
|
var oneCompositionMinWidth = minCellWidth * compositionCols + 20; /* 20px padding */
|
101
100
|
var oneCompositionMinHeight = minColHeight * compositionRows + 20; /* 20px padding */
|
102
|
-
var
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
101
|
+
var contentsWrapper = placeholder.querySelector(".cb-contentslist-wrapper");
|
102
|
+
if (contentsWrapper) {
|
103
|
+
var wrapperH = contentsWrapper.clientHeight;
|
104
|
+
var tempCompositionH = oneComposition.clientHeight;
|
105
|
+
console.log("wrapperH, tempCompositionH:", wrapperH, tempCompositionH);
|
106
|
+
if (tempCompositionH > wrapperH) {
|
107
|
+
oneCompositionMinHeight = tempCompositionH;
|
108
|
+
}
|
109
|
+
var styles = getComputedStyle(target);
|
110
|
+
var paddingL = parseFloat(styles.paddingLeft);
|
111
|
+
var paddingR = parseFloat(styles.paddingRight);
|
112
|
+
var paddingT = parseFloat(styles.paddingTop);
|
113
|
+
var paddingB = parseFloat(styles.paddingBottom);
|
114
|
+
var paddingLR = paddingL + paddingR;
|
115
|
+
var paddingTB = paddingT + paddingB;
|
116
|
+
var listMinWidth = oneCompositionMinWidth * numberOfColumns +
|
117
|
+
(numberOfColumns - 1) * columnGap +
|
118
|
+
paddingLR;
|
119
|
+
var numberOfRows = Math.ceil(numberOfItems / numberOfColumns);
|
120
|
+
var listMinHeight = oneCompositionMinHeight * numberOfRows +
|
121
|
+
(numberOfRows - 1) * rowGap +
|
122
|
+
paddingTB +
|
123
|
+
insetTop +
|
124
|
+
insetBottom;
|
125
|
+
minWidth.current = listMinWidth;
|
126
|
+
minHeight.current = listMinHeight;
|
127
|
+
return;
|
128
|
+
}
|
122
129
|
}
|
123
130
|
// target.clientHeight -> 실제 "노드"의 height. (gridItem아닌)
|
124
131
|
if (target.clientHeight > elementRef.current.clientHeight) {
|