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:
parent
260a31db81
commit
5db3c1553e
131 changed files with 1388 additions and 929 deletions
|
@ -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 })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue