|
@@ -18,7 +18,7 @@
|
|
|
* ********************************************************************************************************************
|
|
|
*/
|
|
|
|
|
|
-import { SGraphyItem, SGraphyScene } from "@saga-web/graphy/lib";
|
|
|
+import { SGraphItem, SGraphScene } from "@saga-web/graph/lib";
|
|
|
import { Equip } from "./types/Equip";
|
|
|
import { Relation } from "./types/Relation";
|
|
|
import { EquipItem } from "./items/EquipItem";
|
|
@@ -37,7 +37,7 @@ import { LineType } from "./types/LineType";
|
|
|
*
|
|
|
* @author 郝建龙
|
|
|
*/
|
|
|
-export class TopoScene extends SGraphyScene {
|
|
|
+export class TopoScene extends SGraphScene {
|
|
|
/** 所有设备 */
|
|
|
EquipList: EquipItem[] = [];
|
|
|
/** 所有关系item */
|
|
@@ -129,7 +129,7 @@ export class TopoScene extends SGraphyScene {
|
|
|
* 添加单个设备item的锚点
|
|
|
*
|
|
|
*/
|
|
|
- addAllAnchor(parent: SGraphyItem, list: Anchor[]): void {
|
|
|
+ addAllAnchor(parent: SGraphItem, list: Anchor[]): void {
|
|
|
if (list.length) {
|
|
|
list.forEach(t => {
|
|
|
this.addAnchor(parent, t);
|
|
@@ -140,7 +140,7 @@ export class TopoScene extends SGraphyScene {
|
|
|
/**
|
|
|
* 添加设备item的锚点
|
|
|
*/
|
|
|
- addAnchor(parent: SGraphyItem, anchor: Anchor): void {
|
|
|
+ addAnchor(parent: SGraphItem, anchor: Anchor): void {
|
|
|
let item = new AnchorItem(parent, anchor);
|
|
|
this.click(item);
|
|
|
item.visible = this.isShowEquip;
|
|
@@ -258,7 +258,7 @@ export class TopoScene extends SGraphyScene {
|
|
|
* 根据点击设备创建对应item
|
|
|
*
|
|
|
* */
|
|
|
- createItem(data: Equip): SGraphyItem {
|
|
|
+ createItem(data: Equip): SGraphItem {
|
|
|
this.isAdding = true;
|
|
|
this.grabItem = new EquipItem(null, data);
|
|
|
this.click(this.grabItem);
|
|
@@ -326,7 +326,7 @@ export class TopoScene extends SGraphyScene {
|
|
|
* 绑定设备右键事件
|
|
|
*
|
|
|
*/
|
|
|
- click(item: SGraphyItem): void {
|
|
|
+ click(item: SGraphItem): void {
|
|
|
item.connect("ContextMenu", this, this.callback);
|
|
|
}
|
|
|
} // Class TopoScene
|