feat: cancel painter style setting #453

This commit is contained in:
Hufe921
2024-03-12 22:41:23 +08:00
parent 86f4cf5cda
commit 51427c7dc4
2 changed files with 24 additions and 5 deletions
+5
View File
@@ -248,6 +248,11 @@ export class CommandAdapt {
}
public painter(options: IPainterOption) {
// 如果单击且已经有样式设置则取消设置
if (!options.isDblclick && this.draw.getPainterStyle()) {
this.canvasEvent.clearPainterStyle()
return
}
const selection = this.range.getSelection()
if (!selection) return
const painterStyle: IElementStyle = {}