|
@@ -219,7 +219,7 @@ export class EditScence extends SGraphScene {
|
|
|
// 起始锚点
|
|
|
item.startAnchor = anc;
|
|
|
if (anc) {
|
|
|
- anc.parent?.connect('changePos', item, item.changePos)
|
|
|
+ anc.parent ?.connect('changePos', item, item.changePos)
|
|
|
}
|
|
|
this.scenceUpdate(this);
|
|
|
return true
|
|
@@ -229,14 +229,16 @@ export class EditScence extends SGraphScene {
|
|
|
* 增加多边形item lenged
|
|
|
*/
|
|
|
addPolygonItem(event: SMouseEvent): void {
|
|
|
- const SubType = this._legend.SubType ? this._legend.SubType : ''
|
|
|
+ const SubType = this._legend.SubType ? this._legend.SubType : '';
|
|
|
+ //获取信息工程化相关参数
|
|
|
+ const AttachObjectIds = this._legend.InfoTypeId ? this._legend.InfoTypeId : [];
|
|
|
const LegendData: Legend = {
|
|
|
ID: uuid(),
|
|
|
Name: this._legend.Name,
|
|
|
GraphElementType: this._legend.Type,
|
|
|
Num: 1,
|
|
|
GraphElementId: this._legend.Id,
|
|
|
- AttachObjectIds: [],
|
|
|
+ AttachObjectIds: AttachObjectIds,
|
|
|
Type: "Zone",
|
|
|
Pos: { X: event.x, Y: event.y },
|
|
|
OutLine: [{ X: event.x, Y: event.y }],
|
|
@@ -636,6 +638,16 @@ export class EditScence extends SGraphScene {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 更新工程信息化的相关数据
|
|
|
+ * @param AttachObjectIds Array
|
|
|
+ */
|
|
|
+ upadatAttachObjectIds(AttachObjectIds: []): void {
|
|
|
+ if (this.focusItem) {
|
|
|
+ this.focusItem.data.AttachObjectIds = AttachObjectIds;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 删除指定item
|
|
|
*/
|
|
@@ -828,7 +840,7 @@ export class EditScence extends SGraphScene {
|
|
|
|
|
|
/**
|
|
|
* 设置结束锚点
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
setTipeEndanchor(event: SMouseEvent): void {
|
|
|
if (this.grabItem instanceof TipelineItem) {
|
|
@@ -840,7 +852,7 @@ export class EditScence extends SGraphScene {
|
|
|
event.y = p.y;
|
|
|
if (this.grabItem.pointList.length) {
|
|
|
this.grabItem.endAnchor = anc;
|
|
|
- anc.parent?.connect('changePos', this.grabItem, this.grabItem.changePos)
|
|
|
+ anc.parent ?.connect('changePos', this.grabItem, this.grabItem.changePos)
|
|
|
}
|
|
|
this.grabItem.status = SItemStatus.Normal;
|
|
|
}
|