@tsdraw/react 0.9.2 → 0.9.3

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
@@ -1773,6 +1773,10 @@ function useTsdrawCanvasController(options = {}) {
1773
1773
  if (ignorePersistenceChanges) return;
1774
1774
  schedulePersist();
1775
1775
  });
1776
+ const cleanupRenderRequest = editor.onRequestRender(() => {
1777
+ render();
1778
+ refreshSelectionBounds(editor);
1779
+ });
1776
1780
  resize();
1777
1781
  const ro = new ResizeObserver(resize);
1778
1782
  ro.observe(container);
@@ -1841,6 +1845,7 @@ function useTsdrawCanvasController(options = {}) {
1841
1845
  schedulePersistRef.current = null;
1842
1846
  cleanupEditorListener();
1843
1847
  cleanupHistoryListener();
1848
+ cleanupRenderRequest();
1844
1849
  disposeMount?.();
1845
1850
  ro.disconnect();
1846
1851
  canvas.removeEventListener("pointerdown", handlePointerDown);