kopia lustrzana https://github.com/Tldraw/Tldraw
16 wiersze
398 B
TypeScript
16 wiersze
398 B
TypeScript
import { StateNode } from '../StateNode'
|
|
|
|
import { Erasing } from './children/Erasing'
|
|
import { Idle } from './children/Idle'
|
|
import { Pointing } from './children/Pointing'
|
|
|
|
export class EraserShapeTool extends StateNode {
|
|
static override id = 'eraser'
|
|
static initial = 'idle'
|
|
static children = () => [Idle, Pointing, Erasing]
|
|
|
|
onEnter = () => {
|
|
this.editor.setCursor({ type: 'cross' })
|
|
}
|
|
}
|