@pixldocs/canvas-renderer 0.5.32 → 0.5.33

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
@@ -12762,6 +12762,7 @@ class PixldocsRenderer {
12762
12762
  return null;
12763
12763
  }
12764
12764
  async waitForStableTextMetrics(container, config) {
12765
+ var _a, _b, _c;
12765
12766
  if (typeof document !== "undefined") {
12766
12767
  void ensureFontsForResolvedConfig(config);
12767
12768
  await this.waitForRelevantFonts(config);
@@ -12773,21 +12774,11 @@ class PixldocsRenderer {
12773
12774
  clearFabricCharCache();
12774
12775
  clearMeasurementCache();
12775
12776
  };
12776
- const reflowTextboxes = () => {
12777
- var _a, _b, _c;
12778
- clearFontCacheAndRerender(fabricInstance);
12779
- (_a = fabricInstance.calcOffset) == null ? void 0 : _a.call(fabricInstance);
12780
- (_b = fabricInstance.renderAll) == null ? void 0 : _b.call(fabricInstance);
12781
- (_c = fabricInstance.requestRenderAll) == null ? void 0 : _c.call(fabricInstance);
12782
- };
12783
- clearTextMetricCaches();
12784
- await waitForPaint();
12785
- reflowTextboxes();
12786
- await waitForPaint();
12787
12777
  clearTextMetricCaches();
12788
- reflowTextboxes();
12789
12778
  await waitForPaint();
12790
- reflowTextboxes();
12779
+ (_a = fabricInstance.calcOffset) == null ? void 0 : _a.call(fabricInstance);
12780
+ (_b = fabricInstance.renderAll) == null ? void 0 : _b.call(fabricInstance);
12781
+ (_c = fabricInstance.requestRenderAll) == null ? void 0 : _c.call(fabricInstance);
12791
12782
  await waitForPaint();
12792
12783
  }
12793
12784
  }