|
@@ -43,6 +43,8 @@ export class DrawZoneItem extends SGraphStyleItem {
|
|
private isAlt: boolean = false;
|
|
private isAlt: boolean = false;
|
|
/** undo/redo 堆栈 */
|
|
/** undo/redo 堆栈 */
|
|
protected undoStack: SUndoStack = new SUndoStack();
|
|
protected undoStack: SUndoStack = new SUndoStack();
|
|
|
|
+ /** 创建成功标识 */
|
|
|
|
+ creatSuc = false;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 构造函数
|
|
* 构造函数
|
|
@@ -449,9 +451,7 @@ export class DrawZoneItem extends SGraphStyleItem {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
if (this.pointList.length > 2 && len > 0 && len < this.scenceLen) {
|
|
if (this.pointList.length > 2 && len > 0 && len < this.scenceLen) {
|
|
- this.$emit("finishCreated");
|
|
|
|
- this.status = SItemStatus.Normal;
|
|
|
|
- this.releaseItem();
|
|
|
|
|
|
+ this.creatSuc = true;
|
|
} else {
|
|
} else {
|
|
this.insertPoint(event.x, event.y);
|
|
this.insertPoint(event.x, event.y);
|
|
// 记录新增顶点操作记录压入堆栈
|
|
// 记录新增顶点操作记录压入堆栈
|
|
@@ -565,7 +565,12 @@ export class DrawZoneItem extends SGraphStyleItem {
|
|
} else if (this.status == SItemStatus.Normal) {
|
|
} else if (this.status == SItemStatus.Normal) {
|
|
return super.onMouseUp(event);
|
|
return super.onMouseUp(event);
|
|
} else if (this.status == SItemStatus.Create) {
|
|
} else if (this.status == SItemStatus.Create) {
|
|
-
|
|
|
|
|
|
+ if (this.creatSuc) {
|
|
|
|
+ this.$emit("finishCreated");
|
|
|
|
+ this.status = SItemStatus.Normal;
|
|
|
|
+ this.releaseItem();
|
|
|
|
+ this.creatSuc = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|