kopia lustrzana https://github.com/Tldraw/Tldraw
19 wiersze
415 B
TypeScript
19 wiersze
415 B
TypeScript
import { TLEventHandlers } from '../../../types/event-types'
|
|
import { StateNode } from '../../StateNode'
|
|
|
|
export class Idle extends StateNode {
|
|
static override id = 'idle'
|
|
|
|
onPointerDown: TLEventHandlers['onPointerDown'] = (info) => {
|
|
this.parent.transition('pointing', info)
|
|
}
|
|
|
|
onEnter = () => {
|
|
this.editor.setCursor({ type: 'cross' })
|
|
}
|
|
|
|
onCancel = () => {
|
|
this.editor.setSelectedTool('select')
|
|
}
|
|
}
|