From 3c00645e40861649facec3b6a2332083fa065056 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Wed, 22 Sep 2021 09:20:19 +0200 Subject: [PATCH] Fixed the build for examples/basic-dom (runtime only) --- examples/basic-dom/Scene.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basic-dom/Scene.tsx b/examples/basic-dom/Scene.tsx index f3b6ce8..007e321 100644 --- a/examples/basic-dom/Scene.tsx +++ b/examples/basic-dom/Scene.tsx @@ -18,7 +18,7 @@ const Box: React.FC<{ selectedObject: ISheetObject | undefined }> = ({id, sheet, selectedObject}) => { // This is cheap to call and always returns the same value, so no need for useMemo() - const obj = sheet.object(id, null, boxObjectConfig) + const obj = sheet.object(id, boxObjectConfig) const isSelected = selectedObject === obj @@ -45,7 +45,7 @@ const Box: React.FC<{ }, onDrag(x, y) { if (!firstOnDragCalled) { - studio.__experimental_setSelection([obj]) + studio.setSelection([obj]) firstOnDragCalled = true } scrub!.capture(({set}) => { @@ -68,7 +68,7 @@ const Box: React.FC<{ return (
{ - studio.__experimental_setSelection([obj]) + studio.setSelection([obj]) }} ref={setDivRef} style={{ @@ -95,7 +95,7 @@ export const Scene: React.FC<{project: IProject}> = ({project}) => { const [selection, _setSelection] = useState([]) useLayoutEffect(() => { - return studio.__experimental_onSelectionChange((newSelection) => { + return studio.onSelectionChange((newSelection) => { _setSelection(newSelection) }) })