Update DrawingInteraction.ts

pull/3092/head
Steve Ruiz 2024-03-15 08:28:49 +00:00
rodzic 17bb673a31
commit 4f597d88cb
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -17,6 +17,7 @@ import { STROKE_SIZES } from '../shapes/shared/default-shape-constants'
// todo:
// - move strokesize to info
// - move interrupt logic to drawing tool
// - move can close to the info / config
type DrawableShape = TLDrawShape | TLHighlightShape
@ -214,6 +215,7 @@ export class DrawingInteraction extends Interaction<{
this.initialShape = this.editor.getShape<DrawableShape>(id)!
}
// todo: move this to the info / config
private canClose() {
return this.info.shapeType !== 'highlight'
}