@pixldocs/canvas-renderer 0.4.7 → 0.4.8

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/index.js CHANGED
@@ -10221,7 +10221,12 @@ function setInTree(nodes, elementId, targetProperty, value) {
10221
10221
  } else {
10222
10222
  node[targetProperty] = value;
10223
10223
  }
10224
- if (targetProperty === "text" && node.type === "text") delete node.height;
10224
+ if (targetProperty === "text" && node.type === "text") {
10225
+ const overflowPolicy = String(node.overflowPolicy ?? "grow-and-push");
10226
+ if (overflowPolicy !== "auto-shrink") {
10227
+ delete node.height;
10228
+ }
10229
+ }
10225
10230
  return true;
10226
10231
  }
10227
10232
  if (node.children && Array.isArray(node.children)) {