publ-echo-test 0.0.219 → 0.0.221

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.
@@ -143,7 +143,10 @@ var GridItem = function (_a) {
143
143
  var hasPaddingChanged = false;
144
144
  var minWidth = Number(mutation.target.dataset.minWidth);
145
145
  var minHeight = Number(mutation.target.dataset.minHeight);
146
- console.log('minWidth', minWidth, 'minHeight', minHeight);
146
+ // If minWidth or minHeight is NaN, return early to prevent errors
147
+ if (isNaN(minWidth) || isNaN(minHeight)) {
148
+ return;
149
+ }
147
150
  var height = isSizeChanged
148
151
  ? mutation.target.parentNode.clientHeight
149
152
  : mutation.target.clientHeight;
@@ -151,6 +154,8 @@ var GridItem = function (_a) {
151
154
  if (!isSizeChanged && mutation.target instanceof Element) {
152
155
  var styles = getComputedStyle(mutation.target);
153
156
  var minWidth_1 = parseFloat(styles.minWidth);
157
+ console.log('minWidth', minWidth_1, 'width', width);
158
+ console.log('minHeight', minHeight, 'height', height);
154
159
  if (minWidth_1 > width) {
155
160
  keepWidth = false;
156
161
  }
@@ -173,8 +178,11 @@ var GridItem = function (_a) {
173
178
  width: minWidth,
174
179
  height: minHeight,
175
180
  }, x, y, 'e', props.w, props.h, false), w_2 = _a.w, h_2 = _a.h;
176
- if (keepWidth) {
177
- w_2 = prevW;
181
+ // if (keepWidth) {
182
+ // w = prevW;
183
+ // }
184
+ if (minWidth > w_2) {
185
+ w_2 = minWidth;
178
186
  }
179
187
  if (prevH > h_2) {
180
188
  h_2 = prevH;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.219",
3
+ "version": "0.0.221",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",