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