diff --git a/packages/plugin-r3f/src/components/Editor.tsx b/packages/plugin-r3f/src/components/Editor.tsx index 3efd795..64cc611 100644 --- a/packages/plugin-r3f/src/components/Editor.tsx +++ b/packages/plugin-r3f/src/components/Editor.tsx @@ -73,7 +73,7 @@ const Editor: VFC = () => { shallow, ) - const editorOpen = !!useVal(editorObject?.props._isOpen) + const editorOpen = useVal(editorObject?.props.isOpen) useLayoutEffect(() => { if (editorOpen) { createSnapshot() @@ -120,7 +120,7 @@ const Editor: VFC = () => { className="fixed bottom-5 left-5" onClick={() => { studio.transaction(({set}) => { - set(editorObject.props._isOpen, 1) + set(editorObject.props.isOpen, true) }) }} > diff --git a/packages/plugin-r3f/src/components/UI.tsx b/packages/plugin-r3f/src/components/UI.tsx index 95045f4..283466f 100644 --- a/packages/plugin-r3f/src/components/UI.tsx +++ b/packages/plugin-r3f/src/components/UI.tsx @@ -139,7 +139,7 @@ const UI: VFC = () => { className="absolute left-0 bottom-0 pointer-events-auto" onClick={() => studio.transaction(({set}) => { - set(editorObject.props._isOpen, 0) + set(editorObject.props.isOpen, false) }) } > diff --git a/packages/plugin-r3f/src/store.ts b/packages/plugin-r3f/src/store.ts index a710449..ead885d 100644 --- a/packages/plugin-r3f/src/store.ts +++ b/packages/plugin-r3f/src/store.ts @@ -366,7 +366,7 @@ export type BindFunction = (options: { const editorSheetObjectConfig = { props: types.compound({ - _isOpen: types.number(0), + isOpen: types.boolean(false), }), }