|
@@ -1,6 +1,6 @@
|
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
|
import { SGraphScene, SGraphLayoutType, SAnchorItem } from '@saga-web/graph/lib';
|
|
|
-import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem } from "@saga-web/big";
|
|
|
+import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem, ItemColor } from "@saga-web/big";
|
|
|
import { SGraphItem, SLineStyle, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
|
|
|
import { SZoneLegendItem } from "@/lib/items/SZoneLegendItem";
|
|
|
import { SSCPZZoneLegendItem } from "@/lib/items/SSCPZZoneLegendItem";
|
|
@@ -71,6 +71,12 @@ export class EditScence extends SGraphScene {
|
|
|
super();
|
|
|
// // 选择绑定选额item事件
|
|
|
this.selectContainer.connect("listChange", this, this.listChange);
|
|
|
+ ItemColor.spaceColor = new SColor("#A4ABB22B")
|
|
|
+ ItemColor.wallColor = new SColor("#A7AEB3FF")
|
|
|
+ ItemColor.columnColor = new SColor("#A7AEB3FF")
|
|
|
+ ItemColor.virtualWallColor = new SColor("#A7AEB3FF")
|
|
|
+ ItemColor.selectColor = new SColor("#84A0BB2B")
|
|
|
+ ItemColor.spaceBorderColor = new SColor("#A7AEB3FF")
|
|
|
}
|
|
|
/** 绘制图例样式 */
|
|
|
_legend: any | null = null;
|
|
@@ -220,6 +226,8 @@ export class EditScence extends SGraphScene {
|
|
|
item.startAnchor = anc;
|
|
|
if (anc) {
|
|
|
anc.parent?.connect('changePos', item, item.changePos)
|
|
|
+ item.anchor1ID = anc.id;
|
|
|
+ item.node1Id = anc.parent.id;
|
|
|
}
|
|
|
this.scenceUpdate(this);
|
|
|
return true
|
|
@@ -832,17 +840,24 @@ export class EditScence extends SGraphScene {
|
|
|
*/
|
|
|
setTipeEndanchor(event: SMouseEvent): void {
|
|
|
if (this.grabItem instanceof TipelineItem) {
|
|
|
- const anc = this.clickIsAnchor(event);
|
|
|
- if (anc) {
|
|
|
- const p = anc.mapToScene(0, 0)
|
|
|
- anc.isConnected = true;
|
|
|
- event.x = p.x;
|
|
|
- event.y = p.y;
|
|
|
- if (this.grabItem.pointList.length) {
|
|
|
- this.grabItem.endAnchor = anc;
|
|
|
- anc.parent?.connect('changePos', this.grabItem, this.grabItem.changePos)
|
|
|
+ if (this.grabItem.status == SItemStatus.Create) {
|
|
|
+ const anc = this.clickIsAnchor(event);
|
|
|
+ if (anc) {
|
|
|
+ const p = anc.mapToScene(0, 0)
|
|
|
+ anc.isConnected = true;
|
|
|
+ event.x = p.x;
|
|
|
+ event.y = p.y;
|
|
|
+ if (this.grabItem.pointList.length) {
|
|
|
+ this.grabItem.endAnchor = anc;
|
|
|
+ anc.parent?.connect('changePos', this.grabItem, this.grabItem.changePos)
|
|
|
+ }
|
|
|
+ this.grabItem.anchor2ID = anc.id
|
|
|
+ this.grabItem.node2Id = anc.parent.id
|
|
|
+ this.grabItem.onMouseDown(event)
|
|
|
+ this.grabItem.status = SItemStatus.Normal;
|
|
|
+ this.finishCreated(this.grabItem)
|
|
|
+ return
|
|
|
}
|
|
|
- this.grabItem.status = SItemStatus.Normal;
|
|
|
}
|
|
|
this.grabItem.onMouseDown(event)
|
|
|
}
|