|
@@ -12,19 +12,19 @@ import { SWindowItem } from "../items/floor/SWindowItem";
|
|
import { Casement } from "../types/floor/Casement";
|
|
import { Casement } from "../types/floor/Casement";
|
|
import { SZoneItem } from "../items/floor/ZoneItem";
|
|
import { SZoneItem } from "../items/floor/ZoneItem";
|
|
import { Zone } from "../types/floor/Zone";
|
|
import { Zone } from "../types/floor/Zone";
|
|
-import { SImageItem } from "..";
|
|
|
|
import { ImageData } from "../types/ImageData";
|
|
import { ImageData } from "../types/ImageData";
|
|
import { Node } from "../types/topology/Node";
|
|
import { Node } from "../types/topology/Node";
|
|
import { Marker } from "../types/topology/Marker";
|
|
import { Marker } from "../types/topology/Marker";
|
|
import { Relation } from "../types/topology/Relation";
|
|
import { Relation } from "../types/topology/Relation";
|
|
-import { SEntityItem } from "..";
|
|
|
|
-import { SRelation } from "..";
|
|
|
|
-import { SLineRelation } from "..";
|
|
|
|
-import { SVerticalRelation } from "..";
|
|
|
|
-import { SCurveRelation } from "..";
|
|
|
|
import { Anchor } from "../types/topology/Anchor";
|
|
import { Anchor } from "../types/topology/Anchor";
|
|
-import { SAnchorItem } from "..";
|
|
|
|
import { SLineType } from "../enums/SLineType";
|
|
import { SLineType } from "../enums/SLineType";
|
|
|
|
+import { SAnchorItem, SEntityItem, SImageItem, SMarkerItem } from "..";
|
|
|
|
+import {
|
|
|
|
+ SRelation,
|
|
|
|
+ SLineRelation,
|
|
|
|
+ SVerticalRelation,
|
|
|
|
+ SCurveRelation
|
|
|
|
+} from "..";
|
|
|
|
|
|
/**
|
|
/**
|
|
* 拓扑图信息解析器
|
|
* 拓扑图信息解析器
|
|
@@ -132,16 +132,7 @@ export class SItemFactory {
|
|
* @param data 图例节点数据
|
|
* @param data 图例节点数据
|
|
* */
|
|
* */
|
|
createNode(data: Node): SEntityItem {
|
|
createNode(data: Node): SEntityItem {
|
|
- let entityItem = new SEntityItem(null);
|
|
|
|
- if (data.AnchorList && data.AnchorList.length) {
|
|
|
|
- data.AnchorList.forEach((anchor: Anchor) => {
|
|
|
|
- let anchorItem = new SAnchorItem(entityItem);
|
|
|
|
- if (anchor && anchor.Pos) {
|
|
|
|
- anchorItem.moveTo(anchor.Pos.X, anchor.Pos.Y);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- return entityItem;
|
|
|
|
|
|
+ return new SEntityItem(null, data);
|
|
} // Function createNode()
|
|
} // Function createNode()
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -149,8 +140,8 @@ export class SItemFactory {
|
|
*
|
|
*
|
|
* @param data 标识对象数据
|
|
* @param data 标识对象数据
|
|
* */
|
|
* */
|
|
- createMarker(data: Marker): SImageItem {
|
|
|
|
- return new SImageItem(null);
|
|
|
|
|
|
+ createMarker(data: Marker): SMarkerItem {
|
|
|
|
+ return new SMarkerItem(null, data);
|
|
} // Function createMarker()
|
|
} // Function createMarker()
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -158,17 +149,8 @@ export class SItemFactory {
|
|
*
|
|
*
|
|
* @param data 管线关系对象数据
|
|
* @param data 管线关系对象数据
|
|
* */
|
|
* */
|
|
- createRelation(data: Relation): SRelation {
|
|
|
|
- switch (data.LineType) {
|
|
|
|
- case SLineType.Line:
|
|
|
|
- return new SLineRelation(null);
|
|
|
|
- case SLineType.Angle:
|
|
|
|
- return new SVerticalRelation(null);
|
|
|
|
- case SLineType.Curve:
|
|
|
|
- return new SCurveRelation(null);
|
|
|
|
- default:
|
|
|
|
- return new SLineRelation(null);
|
|
|
|
- }
|
|
|
|
|
|
+ createRelation(data: Relation): SVerticalRelation {
|
|
|
|
+ return new SVerticalRelation(null, data);
|
|
} // Function createRelation()
|
|
} // Function createRelation()
|
|
|
|
|
|
/**
|
|
/**
|