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

16 wiersze
406 B
TypeScript
Czysty Zwykły widok Historia

import { TLStyleType } from '@tldraw/tlschema'
2023-04-25 11:01:25 +00:00
import { StateNode } from '../StateNode'
import { Idle } from './children/Idle'
import { Pointing } from './children/Pointing'
export class LineShapeTool extends StateNode {
2023-04-25 11:01:25 +00:00
static override id = 'line'
static initial = 'idle'
static children = () => [Idle, Pointing]
shapeType = 'line'
2023-04-25 11:01:25 +00:00
styles = ['color', 'dash', 'size', 'spline'] as TLStyleType[]
2023-04-25 11:01:25 +00:00
}