publ-echo-test 0.0.274 → 0.0.276

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.
@@ -255,41 +255,53 @@ var GridItem = function (_a) {
255
255
  observer.disconnect();
256
256
  };
257
257
  }, [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]);
258
+ // useEffect(() => {
259
+ // if (!isSelected || !autoResize) {
260
+ // return;
261
+ // }
262
+ // const targetNode = elementRef.current?.children[0].children[0].children[0];
263
+ // if (!targetNode || isDragging || isResizing) {
264
+ // return;
265
+ // }
266
+ // if (targetNode.id !== "contentslist-box") {
267
+ // return;
268
+ // }
269
+ // const minWidth = Number((targetNode as HTMLElement).dataset?.minWidth ?? 0);
270
+ // const minHeight = Number(
271
+ // (targetNode as HTMLElement).dataset?.minHeight ?? 0
272
+ // );
273
+ // const insetTop = Number((targetNode as HTMLElement).dataset.insetTop!);
274
+ // const insetBottom = Number(
275
+ // (targetNode as HTMLElement).dataset.insetBottom!
276
+ // );
277
+ // let { w, h } = calcWH(
278
+ // getPositionParams(),
279
+ // {
280
+ // width: minWidth,
281
+ // height: minHeight + insetTop + insetBottom,
282
+ // },
283
+ // x,
284
+ // y,
285
+ // "e",
286
+ // props.w,
287
+ // props.h,
288
+ // true
289
+ // );
290
+ // const prevW = props.w;
291
+ // const prevH = props.h;
292
+ // if (prevW > w) {
293
+ // w = prevW;
294
+ // }
295
+ // if (prevH > h) {
296
+ // h = prevH;
297
+ // }
298
+ // if (prevH === h && prevW === w) {
299
+ // console.log("cancelled 3");
300
+ // return;
301
+ // }
302
+ // props.onFitToContent &&
303
+ // props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: true });
304
+ // }, [isSelected, isResizing]);
293
305
  // const moveDroppingItem = (prevProps: GridItemProps) => {
294
306
  // const { droppingPosition } = props;
295
307
  // 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.276",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",