Tldraw/packages/editor/src/lib/editor/tools/ArrowShapeTool/ArrowShapeTool.ts

23 wiersze
466 B
TypeScript

import { TLStyleType } from '@tldraw/tlschema'
import { StateNode } from '../StateNode'
import { Idle } from './children/Idle'
import { Pointing } from './children/Pointing'
export class ArrowShapeTool extends StateNode {
static override id = 'arrow'
static initial = 'idle'
static children = () => [Idle, Pointing]
shapeType = 'arrow'
styles = [
'color',
'dash',
'size',
'arrowheadStart',
'arrowheadEnd',
'font',
'fill',
] as TLStyleType[]
}