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.
@@ -246,7 +246,9 @@ var GridItem = function (_a) {
246
246
  // 관찰할 DOM 변이 설정
247
247
  var config = { attributes: true, characterData: true };
248
248
  // 대상 노드와 설정으로 관찰 시작
249
- observer.observe(targetNode, config);
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(function () {
259
- var _a, _b, _c, _d, _e;
260
- if (!isSelected || !autoResize) {
261
- return;
262
- }
263
- var targetNode = (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0].children[0];
264
- if (!targetNode || isDragging || isResizing) {
265
- return;
266
- }
267
- if (targetNode.id !== "contentslist-box") {
268
- return;
269
- }
270
- var minWidth = Number((_c = (_b = targetNode.dataset) === null || _b === void 0 ? void 0 : _b.minWidth) !== null && _c !== void 0 ? _c : 0);
271
- var minHeight = Number((_e = (_d = targetNode.dataset) === null || _d === void 0 ? void 0 : _d.minHeight) !== null && _e !== void 0 ? _e : 0);
272
- var insetTop = Number(targetNode.dataset.insetTop);
273
- var insetBottom = Number(targetNode.dataset.insetBottom);
274
- var _f = calcWH(getPositionParams(), {
275
- width: minWidth,
276
- height: minHeight + insetTop + insetBottom,
277
- }, x, y, "e", props.w, props.h, true), w = _f.w, h = _f.h;
278
- var prevW = props.w;
279
- var prevH = props.h;
280
- if (prevW > w) {
281
- w = prevW;
282
- }
283
- if (prevH > h) {
284
- h = prevH;
285
- }
286
- if (prevH === h && prevW === w) {
287
- console.log("cancelled 3");
288
- return;
289
- }
290
- props.onFitToContent &&
291
- props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: true });
292
- }, [isSelected, isResizing]);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.274",
3
+ "version": "0.0.277",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",