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.
- package/dist/lib/GridItem/GridItem.js +47 -35
- package/package.json +1 -1
@@ -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(
|
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
|
-
|
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;
|