publ-echo-test 0.0.273 → 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.
@@ -189,6 +189,9 @@ var GridItem = function (_a) {
189
189
  paddingTB +
190
190
  insetTop_1 +
191
191
  insetBottom_1;
192
+ console.log("minH", listMinHeight);
193
+ console.log("oneCompositionMinHeight", oneCompositionMinHeight);
194
+ console.log("insetTop, insetBottom", insetTop_1, insetBottom_1);
192
195
  if (listMinHeight > gridWrapperTotalH) {
193
196
  minHeight = listMinHeight;
194
197
  }
@@ -252,41 +255,53 @@ var GridItem = function (_a) {
252
255
  observer.disconnect();
253
256
  };
254
257
  }, [autoResize, isSelected, isDragging, isResizing, props.w, props.h, x, y]);
255
- useEffect(function () {
256
- var _a, _b, _c, _d, _e;
257
- if (!isSelected || !autoResize) {
258
- return;
259
- }
260
- var targetNode = (_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.children[0].children[0].children[0];
261
- if (!targetNode || isDragging || isResizing) {
262
- return;
263
- }
264
- if (targetNode.id !== "contentslist-box") {
265
- return;
266
- }
267
- var minWidth = Number((_c = (_b = targetNode.dataset) === null || _b === void 0 ? void 0 : _b.minWidth) !== null && _c !== void 0 ? _c : 0);
268
- var minHeight = Number((_e = (_d = targetNode.dataset) === null || _d === void 0 ? void 0 : _d.minHeight) !== null && _e !== void 0 ? _e : 0);
269
- var insetTop = Number(targetNode.dataset.insetTop);
270
- var insetBottom = Number(targetNode.dataset.insetBottom);
271
- var _f = calcWH(getPositionParams(), {
272
- width: minWidth,
273
- height: minHeight + insetTop + insetBottom,
274
- }, x, y, "e", props.w, props.h, true), w = _f.w, h = _f.h;
275
- var prevW = props.w;
276
- var prevH = props.h;
277
- if (prevW > w) {
278
- w = prevW;
279
- }
280
- if (prevH > h) {
281
- h = prevH;
282
- }
283
- if (prevH === h && prevW === w) {
284
- console.log("cancelled 3");
285
- return;
286
- }
287
- props.onFitToContent &&
288
- props.onFitToContent(i, w, h, x, y, { hasPaddingChanged: true });
289
- }, [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]);
290
305
  // const moveDroppingItem = (prevProps: GridItemProps) => {
291
306
  // const { droppingPosition } = props;
292
307
  // if (!droppingPosition) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.273",
3
+ "version": "0.0.276",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",