Replace Atom.value with Atom.get() (#2189)

This PR replaces the `.value` getter for the atom with `.get()`

### Change Type

- [x] `major` — Breaking change

---------

Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com>
This commit is contained in:
Steve Ruiz 2023-11-13 11:51:22 +00:00 committed by GitHub
parent 260a31db81
commit 5db3c1553e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
131 changed files with 1388 additions and 929 deletions

View file

@ -40,7 +40,7 @@ export function useCanvasEvents() {
...getPointerInfo(e),
})
if (editor.openMenus.length > 0) {
if (editor.getOpenMenus().length > 0) {
editor.updateInstanceState({
openMenus: [],
})
@ -83,14 +83,14 @@ export function useCanvasEvents() {
function onPointerEnter(e: React.PointerEvent) {
if ((e as any).isKilled) return
if (editor.instanceState.isPenMode && e.pointerType !== 'pen') return
if (editor.getInstanceState().isPenMode && e.pointerType !== 'pen') return
const canHover = e.pointerType === 'mouse' || e.pointerType === 'pen'
editor.updateInstanceState({ isHoveringCanvas: canHover ? true : null })
}
function onPointerLeave(e: React.PointerEvent) {
if ((e as any).isKilled) return
if (editor.instanceState.isPenMode && e.pointerType !== 'pen') return
if (editor.getInstanceState().isPenMode && e.pointerType !== 'pen') return
const canHover = e.pointerType === 'mouse' || e.pointerType === 'pen'
editor.updateInstanceState({ isHoveringCanvas: canHover ? false : null })
}