publ-echo-test 0.0.274 → 0.0.277
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.
- package/dist/lib/GridItem/GridItem.js +50 -36
- package/package.json +1 -1
@@ -246,7 +246,9 @@ var GridItem = function (_a) {
|
|
246
246
|
// 관찰할 DOM 변이 설정
|
247
247
|
var config = { attributes: true, characterData: true };
|
248
248
|
// 대상 노드와 설정으로 관찰 시작
|
249
|
-
|
249
|
+
setTimeout(function () {
|
250
|
+
observer.observe(targetNode, config);
|
251
|
+
}, 0);
|
250
252
|
// 정리 함수에서 MutationObserver 해제
|
251
253
|
return function () {
|
252
254
|
if (targetNode.id !== "contentslist-box") {
|
@@ -255,41 +257,53 @@ var GridItem = function (_a) {
|
|
255
257
|
observer.disconnect();
|
256
258
|
};
|
257
259
|
}, [autoResize, isSelected, isDragging, isResizing, props.w, props.h, x, y]);
|
258
|
-
useEffect(
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
260
|
+
// useEffect(() => {
|
261
|
+
// if (!isSelected || !autoResize) {
|
262
|
+
// return;
|
263
|
+
// }
|
264
|
+
// const targetNode = elementRef.current?.children[0].children[0].children[0];
|
265
|
+
// if (!targetNode || isDragging || isResizing) {
|
266
|
+
// return;
|
267
|
+
// }
|
268
|
+
// if (targetNode.id !== "contentslist-box") {
|
269
|
+
// return;
|
270
|
+
// }
|
271
|
+
// const minWidth = Number((targetNode as HTMLElement).dataset?.minWidth ?? 0);
|
272
|
+
// const minHeight = Number(
|
273
|
+
// (targetNode as HTMLElement).dataset?.minHeight ?? 0
|
274
|
+
// );
|
275
|
+
// const insetTop = Number((targetNode as HTMLElement).dataset.insetTop!);
|
276
|
+
// const insetBottom = Number(
|
277
|
+
// (targetNode as HTMLElement).dataset.insetBottom!
|
278
|
+
// );
|
279
|
+
// let { w, h } = calcWH(
|
280
|
+
// getPositionParams(),
|
281
|
+
// {
|
282
|
+
// width: minWidth,
|
283
|
+
// height: minHeight + insetTop + insetBottom,
|
284
|
+
// },
|
285
|
+
// x,
|
286
|
+
// y,
|
287
|
+
// "e",
|
288
|
+
// props.w,
|
289
|
+
// props.h,
|
290
|
+
// true
|
291
|
+
// );
|
292
|
+
// const prevW = props.w;
|
293
|
+
// const prevH = props.h;
|
294
|
+
// if (prevW > w) {
|
295
|
+
// w = prevW;
|
296
|
+
// }
|
297
|
+
// if (prevH > h) {
|
298
|
+
// h = prevH;
|
299
|
+
// }
|
300
|
+
// if (prevH === h && prevW === w) {
|
301
|
+
// console.log("cancelled 3");
|
302
|
+
// return;
|
303
|
+
// }
|
304
|
+
// props.onFitToContent &&
|
305
|
+
// props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: true });
|
306
|
+
// }, [isSelected, isResizing]);
|
293
307
|
// const moveDroppingItem = (prevProps: GridItemProps) => {
|
294
308
|
// const { droppingPosition } = props;
|
295
309
|
// if (!droppingPosition) return;
|