publ-echo-test 0.0.12 → 0.0.13

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.
@@ -53,9 +53,11 @@ var Resizable = function (_a) {
53
53
  var className = props.className, draggableOpts = props.draggableOpts, width = props.width, height = props.height, handle = props.handle, onResize = props.onResize, onResizeStop = props.onResizeStop, onResizeStart = props.onResizeStart, restProps = __rest(props, ["className", "draggableOpts", "width", "height", "handle", "onResize", "onResizeStop", "onResizeStart"]);
54
54
  var elementRef = children.ref;
55
55
  var extendedHeightRef = useRef(null);
56
+ var minWidth = useRef(0);
56
57
  useEffect(function () {
57
58
  if (!isResizing) {
58
59
  extendedHeightRef.current = null;
60
+ minWidth.current = 0;
59
61
  return;
60
62
  }
61
63
  if (!elementRef.current) {
@@ -72,6 +74,10 @@ var Resizable = function (_a) {
72
74
  else {
73
75
  extendedHeightRef.current = null;
74
76
  }
77
+ var minWidthStyle = target.computedStyleMap().get('min-width');
78
+ if (typeof minWidthStyle.value === 'number') {
79
+ minWidth.current = minWidthStyle.value;
80
+ }
75
81
  }, [isResizing, children]);
76
82
  var resetData = function () {
77
83
  lastHandleRect = slack = null;
@@ -202,6 +208,7 @@ var Resizable = function (_a) {
202
208
  if (axisH === "w") {
203
209
  left = left - deltaX;
204
210
  }
211
+ width = width > minWidth.current ? width : minWidth.current;
205
212
  if (extendedHeightRef.current) {
206
213
  height = extendedHeightRef.current;
207
214
  handleAxis = removeNorthHandle(handleAxis);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",