API naming tweaks

This commit is contained in:
Aria Minaei 2021-09-01 10:36:44 +02:00
parent 36017c6a73
commit a8df97a06a
21 changed files with 86 additions and 74 deletions

View file

@ -172,7 +172,7 @@ const EditableProxy: VFC<EditableProxyProps> = ({
if (!theatreObject) {
console.log('no theatre object for', uniqueName)
} else {
studio.__experimental_setSelection([theatreObject])
studio.setSelection([theatreObject])
}
}
}}
@ -206,7 +206,7 @@ const EditableProxy: VFC<EditableProxyProps> = ({
if (!theatreObject) {
console.log('no theatre object for', uniqueName)
} else {
studio.__experimental_setSelection([theatreObject])
studio.setSelection([theatreObject])
}
}
}}

View file

@ -120,7 +120,7 @@ const SnapshotEditor: React.FC<{paneId: string}> = (props) => {
}, [editorOpen])
const onPointerMissed = useCallback(() => {
if (sheet !== null) studio.__experimental_setSelection([sheet])
if (sheet !== null) studio.setSelection([sheet])
}, [sheet])
if (!editorObject) return <></>

View file

@ -20,7 +20,7 @@ export function useSelected(): undefined | string {
}
}
setFromStudio(studio.selection)
return studio.__experimental_onSelectionChange(setFromStudio)
return studio.onSelectionChange(setFromStudio)
}, [sheet])
return state