@pixldocs/canvas-renderer 0.5.59 → 0.5.60

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
@@ -286,14 +286,13 @@ function getTextboxWidthFitMetrics(textbox, targetWidth) {
286
286
  const dynamicMinWidth = Number(textbox.dynamicMinWidth ?? 0);
287
287
  const lineWidths = getCanvasMeasuredTextboxLineWidths(textbox);
288
288
  const maxLineWidth = lineWidths.length > 0 ? Math.max(...lineWidths) : 0;
289
- const grownWidth = Math.max(actualTextboxWidth, dynamicMinWidth);
290
- const widthDidGrow = grownWidth > targetWidth + 0.5;
289
+ const widthDidGrow = actualTextboxWidth > targetWidth + 0.5;
291
290
  return {
292
291
  actualTextboxWidth,
293
292
  dynamicMinWidth,
294
293
  maxLineWidth,
295
294
  widthDidGrow,
296
- fitsWidth: !widthDidGrow && maxLineWidth <= targetWidth + 1
295
+ fitsWidth: maxLineWidth <= targetWidth + 1
297
296
  };
298
297
  }
299
298
  function getCacheKey(element) {