|
@@ -178,7 +178,7 @@ export class EditScence extends SGraphScene {
|
|
item.zOrder = ItemOrder.lineOrder;
|
|
item.zOrder = ItemOrder.lineOrder;
|
|
item.selectable = true;
|
|
item.selectable = true;
|
|
this.addItem(item);
|
|
this.addItem(item);
|
|
- this.Markers.push(item);
|
|
|
|
|
|
+ // this.Markers.push(item);
|
|
item.connect("finishCreated", this, this.finishCreated);
|
|
item.connect("finishCreated", this, this.finishCreated);
|
|
this.grabItem = item;
|
|
this.grabItem = item;
|
|
this.focusItem = item;
|
|
this.focusItem = item;
|
|
@@ -239,7 +239,7 @@ export class EditScence extends SGraphScene {
|
|
item.status = SItemStatus.Create;
|
|
item.status = SItemStatus.Create;
|
|
item.zOrder = ItemOrder.polylineOrder
|
|
item.zOrder = ItemOrder.polylineOrder
|
|
this.addItem(item);
|
|
this.addItem(item);
|
|
- this.Relations.push(item);
|
|
|
|
|
|
+ // this.Relations.push(item);
|
|
item.connect("finishCreated", this, this.finishCreated);
|
|
item.connect("finishCreated", this, this.finishCreated);
|
|
this.grabItem = item;
|
|
this.grabItem = item;
|
|
this.focusItem = item;
|
|
this.focusItem = item;
|
|
@@ -298,7 +298,6 @@ export class EditScence extends SGraphScene {
|
|
Polylines.zOrder = ItemOrder.polygonOrder;
|
|
Polylines.zOrder = ItemOrder.polygonOrder;
|
|
// Polylines.moveable = true;
|
|
// Polylines.moveable = true;
|
|
this.addItem(Polylines);
|
|
this.addItem(Polylines);
|
|
- this.Nodes.push(Polylines);
|
|
|
|
Polylines.connect("finishCreated", this, this.finishCreated);
|
|
Polylines.connect("finishCreated", this, this.finishCreated);
|
|
this.grabItem = Polylines;
|
|
this.grabItem = Polylines;
|
|
this.focusItem = Polylines;
|
|
this.focusItem = Polylines;
|
|
@@ -904,15 +903,24 @@ export class EditScence extends SGraphScene {
|
|
finishCreated(item: any) {
|
|
finishCreated(item: any) {
|
|
let arrList = []
|
|
let arrList = []
|
|
if (this.cmd == 'baseLine') {
|
|
if (this.cmd == 'baseLine') {
|
|
- arrList = this.Markers
|
|
|
|
|
|
+ arrList = this.Markers;
|
|
|
|
+ this.Markers.push(item);
|
|
}
|
|
}
|
|
this.cmd = 'choice';
|
|
this.cmd = 'choice';
|
|
this.selectContainer.clear()
|
|
this.selectContainer.clear()
|
|
this.selectContainer.toggleItem(item)
|
|
this.selectContainer.toggleItem(item)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.focusItem = item;
|
|
this.focusItem = item;
|
|
- })
|
|
|
|
- this.undoStack.push(new SGraphAddCommand(this, item, arrList));
|
|
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if(item instanceof SZoneLegendItem || item instanceof SFHFQZoneLegendItem || item instanceof SSCPZZoneLegendItem){
|
|
|
|
+ this.Nodes.push(item); //完成后,方可扔到Node节点
|
|
|
|
+ }
|
|
|
|
+ // 管道完成后方可保存
|
|
|
|
+ if(item instanceof TipelineItem ){
|
|
|
|
+ this.Relations.push(item);
|
|
|
|
+ }
|
|
|
|
+ this.undoStack.push(new SGraphAddCommand(this, item, arrList));
|
|
}
|
|
}
|
|
////////////////////////
|
|
////////////////////////
|
|
// 以下为鼠标键盘操作事件
|
|
// 以下为鼠标键盘操作事件
|