@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.cjs CHANGED
@@ -305,14 +305,13 @@ function getTextboxWidthFitMetrics(textbox, targetWidth) {
305
305
  const dynamicMinWidth = Number(textbox.dynamicMinWidth ?? 0);
306
306
  const lineWidths = getCanvasMeasuredTextboxLineWidths(textbox);
307
307
  const maxLineWidth = lineWidths.length > 0 ? Math.max(...lineWidths) : 0;
308
- const grownWidth = Math.max(actualTextboxWidth, dynamicMinWidth);
309
- const widthDidGrow = grownWidth > targetWidth + 0.5;
308
+ const widthDidGrow = actualTextboxWidth > targetWidth + 0.5;
310
309
  return {
311
310
  actualTextboxWidth,
312
311
  dynamicMinWidth,
313
312
  maxLineWidth,
314
313
  widthDidGrow,
315
- fitsWidth: !widthDidGrow && maxLineWidth <= targetWidth + 1
314
+ fitsWidth: maxLineWidth <= targetWidth + 1
316
315
  };
317
316
  }
318
317
  function getCacheKey(element) {