@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 +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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:
|
|
295
|
+
fitsWidth: maxLineWidth <= targetWidth + 1
|
|
297
296
|
};
|
|
298
297
|
}
|
|
299
298
|
function getCacheKey(element) {
|