publ-echo-test 0.0.257 → 0.0.259

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.
@@ -31,7 +31,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
31
31
  };
32
32
  import { createElement as _createElement } from "react";
33
33
  import { jsx as _jsx } from "react/jsx-runtime";
34
- import React, { useEffect, useRef, } from "react";
34
+ import React, { useLayoutEffect, useRef, } from "react";
35
35
  import { cloneElement } from "./utils/cloneElement";
36
36
  import { DraggableCore } from "../Draggable";
37
37
  import classNames from "../../external-lib/classnames";
@@ -57,8 +57,8 @@ var Resizable = function (_a) {
57
57
  var shouldShrinkRef = useRef(false);
58
58
  var minWidth = useRef(0);
59
59
  var minHeight = useRef(0);
60
- useEffect(function () {
61
- var _a, _b, _c;
60
+ useLayoutEffect(function () {
61
+ var _a, _b;
62
62
  if (!autoResize) {
63
63
  return;
64
64
  }
@@ -101,12 +101,11 @@ var Resizable = function (_a) {
101
101
  // let oneCompositionMinHeight =
102
102
  // minColHeight * compositionRows + 20; /* 20px padding */
103
103
  var contentsWrapper = placeholder.querySelector(".cb-contentslist-wrapper");
104
- var widthOrHeightChanged = width !== ((_b = startSize.current) === null || _b === void 0 ? void 0 : _b.width) ||
105
- height !== ((_c = startSize.current) === null || _c === void 0 ? void 0 : _c.height);
106
- if (contentsWrapper && widthOrHeightChanged) {
104
+ if (contentsWrapper) {
107
105
  var wrapperH = contentsWrapper.clientHeight;
108
106
  var tempCompositionH = oneComposition.clientHeight;
109
107
  console.log("tempCompositionH", tempCompositionH);
108
+ console.log("parentH", (_b = oneComposition.parentElement) === null || _b === void 0 ? void 0 : _b.clientHeight);
110
109
  var CompositionBGwrapperPaddingT = Number(oneComposition.getAttribute("data-wrapper-paddingT"));
111
110
  var CompositionBGwrapperPaddingB = Number(oneComposition.getAttribute("data-wrapper-paddingB"));
112
111
  if (tempCompositionH > wrapperH) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.257",
3
+ "version": "0.0.259",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",