YaolongHan před 4 roky
rodič
revize
68eac69bb8

+ 22 - 10
src/components/edit/top_toolbar.vue

@@ -36,8 +36,8 @@
               <a-icon type="caret-down" class="down-icon"/>
             </div>
             <a-menu slot="overlay">
-              <a-menu-item v-for="item in alignmentOptions" :key="item.value" @click="changeAlignItem(item.value)">
-                {{item.label}}
+              <a-menu-item  v-for="item in alignmentOptions" :key="item.value" @click="changeAlignItem(item.value)">
+                <img style="width: 16px;margin-right: 5px;" :src="require(`./../../assets/images/`+item.img+`.png`)" alt/> <span>{{item.label}}</span>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -83,35 +83,43 @@ export default {
       alignmentOptions:[  //对齐数据
         {
           value:SGraphLayoutType.Left,
-          label:'左对齐'
+          label:'左对齐',
+          img: "t-left"
         },
         {
           value:SGraphLayoutType.Right,
-          label:'右对齐'
+          label:'右对齐',
+          img: "t-right"
         },
         {
           value:SGraphLayoutType.Top,
-          label:'顶对齐'
+          label:'顶对齐',
+          img: "t-top"
         },
         {
           value:SGraphLayoutType.Bottom,
-          label:'底对齐'
+          label:'底对齐',
+          img: "t-bottom"
         },
         {
           value:SGraphLayoutType.Center,
-          label:'水平居中对齐'
+          label:'水平居中对齐',
+          img:'t-center'
         },
         {
           value:SGraphLayoutType.Middle,
-          label:'垂直居中对齐'
+          label:'垂直居中对齐',
+          img:'t-topandbottm'
         },
         {
           value:SGraphLayoutType.Vertical,
-          label:'垂直分布'
+          label:'垂直分布',
+          img:'t-vertical'
         },
         {
           value:SGraphLayoutType.Horizontal,
-          label:'水平分布'
+          label:'水平分布',
+          img:'t-level'
         }
       ]
     };
@@ -242,4 +250,8 @@ li {
     }
   }
 }
+  /deep/ .ant-dropdown-menu-item{
+    display: flex;
+    align-items: center;
+  }
 </style>

+ 4 - 3
src/components/mapClass/EditScence.ts

@@ -104,10 +104,11 @@ export class EditScence extends SGraphScene {
      */
     addLine(event: SMouseEvent): boolean {
         const item = new SLineItem(null, new SPoint(event.x, event.y));
-        this.addItem(item);
-        item.connect("finishCreated", this, this.finishCreated);
+        item.status = SItemStatus.Create;
         item.zOrder = ItemOrder.lineOrder;
         item.selectable = true;
+        this.addItem(item);
+        item.connect("finishCreated", this, this.finishCreated);
         this.grabItem = item;
         this.undoStack.push(new SGraphAddCommand(this, item));
         // item.connect("onMove", this, this.onItemMove.bind(this));
@@ -387,7 +388,7 @@ export class EditScence extends SGraphScene {
         console.log(this)
     }
 
-]   /**
+    /**
      * 保存数据
      */
     saveMsgItem(): any {

+ 53 - 0
src/lib/items/SImageLegendItem.ts

@@ -11,6 +11,40 @@ import { Legend } from '../types/Legend';
 export class SImageLegendItem extends SIconTextItem {
     /** 图例节点对象数据 */
     data: Legend;
+    /** 图例数量 */
+    _num: number = 0;
+    get num(): number {
+        return this._num;
+    }
+    set num(v: number) {
+        this._num = v;
+        this.data.Num = v;
+        this.update();
+    }
+
+    set name(v: string) {
+        this.data.Name = v;
+    }
+
+    set x(v: number) {
+        this.data.Pos.X = v;
+    }
+
+    set y(v: number) {
+        this.data.Pos.Y = v;
+    }
+
+    set width(v: number) {
+        if (this.data.Size) {
+            this.data.Size.Width = v;
+        }
+    }
+
+    set height(v: number) {
+        if (this.data.Size) {
+            this.data.Size.Height = v;
+        }
+    }
 
     /**
      * 构造函数
@@ -21,5 +55,24 @@ export class SImageLegendItem extends SIconTextItem {
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
         this.data = data;
+        this.id = data.ID;
+        this.moveTo(data.Pos.X, data.Pos.Y);
+        if (data.Num) {
+            this._num = data.Num;
+        }
+        if (data.Size) {
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
+        }
+        if (data.Properties && data.Properties.Text) {
+            if (data.Properties.Text instanceof String) {
+                this.text = `${data.Properties.Text}${data.Num?` × ${data.Num}`:''}`;
+            }
+        }
+        if (data.Properties && data.Properties.Url) {
+            if (data.Properties.Url instanceof String) {
+                this.img.url = data.Properties.Url;
+            }
+        }
     }
 } // Class SImageLegendItem

+ 48 - 93
src/lib/items/SImageMarkerItem.ts

@@ -13,43 +13,43 @@ export class SImageMarkerItem extends SImageItem {
     data: Marker;
 
     /** x轴缩放属性 */
-    _scaleX: number = 1;
-    get scaleX(): number {
-        return this._scaleX;
-    }
-    set scaleX(v: number) {
-        this._scaleX = v;
-        if (this.data.Scale) {
-            this.data.Scale.X = v;
-        }
-        this.update();
-    }
+    // _scaleX: number = 1;
+    // get scaleX(): number {
+    //     return this._scaleX;
+    // }
+    // set scaleX(v: number) {
+    //     this._scaleX = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.X = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴缩放属性 */
-    _scaleY: number = 1;
-    get scaleY(): number {
-        return this._scaleY;
-    }
-    set scaleY(v: number) {
-        this._scaleY = v;
-        if (this.data.Scale) {
-            this.data.Scale.Y = v;
-        }
-        this.update();
-    }
+    // _scaleY: number = 1;
+    // get scaleY(): number {
+    //     return this._scaleY;
+    // }
+    // set scaleY(v: number) {
+    //     this._scaleY = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.Y = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴旋转属性 */
-    _rolate: number = 0;
-    get rolate(): number {
-        return this._rolate;
-    }
-    set rolate(v: number) {
-        this._rolate = v;
-        if (this.data.Rolate) {
-            this.data.Rolate.Z = v;
-        }
-        this.update();
-    }
+    // _rolate: number = 0;
+    // get rolate(): number {
+    //     return this._rolate;
+    // }
+    // set rolate(v: number) {
+    //     this._rolate = v;
+    //     if (this.data.Rolate) {
+    //         this.data.Rolate.Z = v;
+    //     }
+    //     this.update();
+    // }
 
     // set name(v: string) {
     //     this.data.Name = v;
@@ -90,68 +90,23 @@ export class SImageMarkerItem extends SImageItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.data = data;
+        this.id = data.ID;
         this.moveTo(data.Pos.X, data.Pos.Y);
-        if (this.data.Scale) {
-            this.scaleX = this.data.Scale.X;
-            this.scaleY = this.data.Scale.Y;
-        }
-        if (this.data.Rolate && this.data.Rolate.Z) {
-            this.rolate = this.data.Rolate.Z;
-        }
-        if (this.data.Size) {
-            this.width = this.data.Size.Width;
-            this.height = this.data.Size.Height;
-        }
-        if (this.data.Properties && this.data.Properties.Url) {
-            // if (this.data.Properties.Url instanceof String) {
-
-            // }
-            this.url = this.data.Properties.Url;
+        // if (data.Scale) {
+        //     this.scaleX = data.Scale.X;
+        //     this.scaleY = data.Scale.Y;
+        // }
+        // if (data.Rolate && data.Rolate.Z) {
+        //     this.rolate = data.Rolate.Z;
+        // }
+        if (data.Size) {
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
         }
-    } // Constructor
-
-    /**
-     * Item绘制操作
-     *
-     * @param   painter      绘画类
-     */
-    onDraw(painter: SPainter): void {
-        if (this.img) {
-            // 要绘制图片的宽度
-            let width = 0;
-            // 要绘制图片的宽度
-            let height = 0;
-            // 图片item的宽高比
-            let itemAspectRatio: number = this.width / this.height;
-            // 原始图片的宽高比
-            let imgAspectRatio: number =
-                (this.img.width as number) / (this.img.height as number);
-            // 原始图片的高宽比
-            let imgHwRatio: number =
-                (this.img.height as number) / (this.img.width as number);
-            if (this.showType == SImageShowType.Full) {
-                width = this.width;
-                height = this.height;
-            } else if (this.showType == SImageShowType.Equivalency) {
-                if (itemAspectRatio > imgAspectRatio) {
-                    height = this.height;
-                    width = imgAspectRatio * height;
-                } else if (itemAspectRatio < imgAspectRatio) {
-                    width = this.width;
-                    height = width * imgHwRatio;
-                } else {
-                    width = this.width;
-                    height = this.height;
-                }
-            } else if (this.showType == SImageShowType.AutoFit) {
-                this.width = this.img.width as number;
-                this.height = this.img.height as number;
-                width = this.width;
-                height = this.height;
+        if (data.Properties && data.Properties.Url) {
+            if (data.Properties.Url instanceof String) {
+                this.url = data.Properties.Url;
             }
-            painter.scale(this.scaleX, this.scaleY);
-            painter.rotate(this.rolate);
-            painter.drawImage(this.img, -width / 2, -height / 2, width, height);
         }
-    } // Function onDraw()
+    } // Constructor
 } // Class SImageMarkerItem

+ 46 - 45
src/lib/items/SLineLegendItem.ts

@@ -14,43 +14,43 @@ export class SLineLegendItem extends SPolylineItem {
     data: Legend;
 
     /** x轴缩放属性 */
-    _scaleX: number = 1;
-    get scaleX(): number {
-        return this._scaleX;
-    }
-    set scaleX(v: number) {
-        this._scaleX = v;
-        if (this.data.Scale) {
-            this.data.Scale.X = v;
-        }
-        this.update();
-    }
+    // _scaleX: number = 1;
+    // get scaleX(): number {
+    //     return this._scaleX;
+    // }
+    // set scaleX(v: number) {
+    //     this._scaleX = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.X = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴缩放属性 */
-    _scaleY: number = 1;
-    get scaleY(): number {
-        return this._scaleY;
-    }
-    set scaleY(v: number) {
-        this._scaleY = v;
-        if (this.data.Scale) {
-            this.data.Scale.Y = v;
-        }
-        this.update();
-    }
+    // _scaleY: number = 1;
+    // get scaleY(): number {
+    //     return this._scaleY;
+    // }
+    // set scaleY(v: number) {
+    //     this._scaleY = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.Y = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴旋转属性 */
-    _rolate: number = 0;
-    get rolate(): number {
-        return this._rolate;
-    }
-    set rolate(v: number) {
-        this._rolate = v;
-        if (this.data.Rolate) {
-            this.data.Rolate.Z = v;
-        }
-        this.update();
-    }
+    // _rolate: number = 0;
+    // get rolate(): number {
+    //     return this._rolate;
+    // }
+    // set rolate(v: number) {
+    //     this._rolate = v;
+    //     if (this.data.Rolate) {
+    //         this.data.Rolate.Z = v;
+    //     }
+    //     this.update();
+    // }
 
     set name(v: string) {
         this.data.Name = v;
@@ -91,20 +91,21 @@ export class SLineLegendItem extends SPolylineItem {
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent,[]);
         this.data = data;
+        this.id = data.ID;
         this.moveTo(data.Pos.X, data.Pos.Y);
-        if (this.data.Scale) {
-            this.scaleX = this.data.Scale.X;
-            this.scaleY = this.data.Scale.Y;
-        }
-        if (this.data.Rolate && this.data.Rolate.Z) {
-            this.rolate = this.data.Rolate.Z;
-        }
-        if (this.data.Size) {
-            this.width = this.data.Size.Width;
-            this.height = this.data.Size.Height;
+        // if (data.Scale) {
+        //     this.scaleX = data.Scale.X;
+        //     this.scaleY = data.Scale.Y;
+        // }
+        // if (data.Rolate && this.data.Rolate.Z) {
+        //     this.rolate = data.Rolate.Z;
+        // }
+        if (data.Size) {
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
         }
-        if (this.data.Properties && this.data.Properties.Line) {
-            this.line = this.data.Properties.Line;
+        if (data.Properties && data.Properties.Line) {
+            this.line = data.Properties.Line;
         }
     }
 } // Class SLineLegendItem

+ 46 - 45
src/lib/items/SLineMarkerItem.ts

@@ -14,43 +14,43 @@ export class SLineMarkerItem extends SPolylineItem {
     data: Marker;
 
     /** x轴缩放属性 */
-    _scaleX: number = 1;
-    get scaleX(): number {
-        return this._scaleX;
-    }
-    set scaleX(v: number) {
-        this._scaleX = v;
-        if (this.data.Scale) {
-            this.data.Scale.X = v;
-        }
-        this.update();
-    }
+    // _scaleX: number = 1;
+    // get scaleX(): number {
+    //     return this._scaleX;
+    // }
+    // set scaleX(v: number) {
+    //     this._scaleX = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.X = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴缩放属性 */
-    _scaleY: number = 1;
-    get scaleY(): number {
-        return this._scaleY;
-    }
-    set scaleY(v: number) {
-        this._scaleY = v;
-        if (this.data.Scale) {
-            this.data.Scale.Y = v;
-        }
-        this.update();
-    }
+    // _scaleY: number = 1;
+    // get scaleY(): number {
+    //     return this._scaleY;
+    // }
+    // set scaleY(v: number) {
+    //     this._scaleY = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.Y = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴旋转属性 */
-    _rolate: number = 0;
-    get rolate(): number {
-        return this._rolate;
-    }
-    set rolate(v: number) {
-        this._rolate = v;
-        if (this.data.Rolate) {
-            this.data.Rolate.Z = v;
-        }
-        this.update();
-    }
+    // _rolate: number = 0;
+    // get rolate(): number {
+    //     return this._rolate;
+    // }
+    // set rolate(v: number) {
+    //     this._rolate = v;
+    //     if (this.data.Rolate) {
+    //         this.data.Rolate.Z = v;
+    //     }
+    //     this.update();
+    // }
 
     set name(v: string) {
         this.data.Name = v;
@@ -91,20 +91,21 @@ export class SLineMarkerItem extends SPolylineItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent,[]);
         this.data = data;
+        this.id = data.ID;
         this.moveTo(data.Pos.X, data.Pos.Y);
-        if (this.data.Scale) {
-            this.scaleX = this.data.Scale.X;
-            this.scaleY = this.data.Scale.Y;
-        }
-        if (this.data.Rolate && this.data.Rolate.Z) {
-            this.rolate = this.data.Rolate.Z;
-        }
-        if (this.data.Size) {
-            this.width = this.data.Size.Width;
-            this.height = this.data.Size.Height;
+        // if (data.Scale) {
+        //     this.scaleX = data.Scale.X;
+        //     this.scaleY = data.Scale.Y;
+        // }
+        // if (data.Rolate && data.Rolate.Z) {
+        //     this.rolate = data.Rolate.Z;
+        // }
+        if (data.Size) {
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
         }
-        if (this.data.Properties && this.data.Properties.Line) {
-            this.line = this.data.Properties.Line;
+        if (data.Properties && data.Properties.Line) {
+            this.line = data.Properties.Line;
         }
     } // Constructor
 } // Class SLineMarkerItem

+ 1 - 0
src/lib/items/SNoneLegendItem.ts

@@ -19,5 +19,6 @@ export class SNoneLegendItem extends SGraphItem {
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
         this.data = data;
+        this.id = data.ID;
     }
 } // Class SNoneLegendItem

+ 49 - 48
src/lib/items/STextMarkerItem.ts

@@ -33,43 +33,43 @@ export class STextMarkerItem extends STextItem {
     }
 
     /** x轴缩放属性 */
-    _scaleX: number = 1;
-    get scaleX(): number {
-        return this._scaleX;
-    }
-    set scaleX(v: number) {
-        this._scaleX = v;
-        if (this.data.Scale) {
-            this.data.Scale.X = v;
-        }
-        this.update();
-    }
+    // _scaleX: number = 1;
+    // get scaleX(): number {
+    //     return this._scaleX;
+    // }
+    // set scaleX(v: number) {
+    //     this._scaleX = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.X = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴缩放属性 */
-    _scaleY: number = 1;
-    get scaleY(): number {
-        return this._scaleY;
-    }
-    set scaleY(v: number) {
-        this._scaleY = v;
-        if (this.data.Scale) {
-            this.data.Scale.Y = v;
-        }
-        this.update();
-    }
+    // _scaleY: number = 1;
+    // get scaleY(): number {
+    //     return this._scaleY;
+    // }
+    // set scaleY(v: number) {
+    //     this._scaleY = v;
+    //     if (this.data.Scale) {
+    //         this.data.Scale.Y = v;
+    //     }
+    //     this.update();
+    // }
 
     /** y轴旋转属性 */
-    _rolate: number = 0;
-    get rolate(): number {
-        return this._rolate;
-    }
-    set rolate(v: number) {
-        this._rolate = v;
-        if (this.data.Rolate) {
-            this.data.Rolate.Z = v;
-        }
-        this.update();
-    }
+    // _rolate: number = 0;
+    // get rolate(): number {
+    //     return this._rolate;
+    // }
+    // set rolate(v: number) {
+    //     this._rolate = v;
+    //     if (this.data.Rolate) {
+    //         this.data.Rolate.Z = v;
+    //     }
+    //     this.update();
+    // }
 
     set name(v: string) {
         this.data.Name = v;
@@ -110,21 +110,22 @@ export class STextMarkerItem extends STextItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.data = data;
+        this.id = data.ID;
         this.moveTo(data.Pos.X, data.Pos.Y);
-        if (this.data.Scale) {
-            this.scaleX = this.data.Scale.X;
-            this.scaleY = this.data.Scale.Y;
-        }
-        if (this.data.Rolate && this.data.Rolate.Z) {
-            this.rolate = this.data.Rolate.Z;
-        }
-        if (this.data.Size) {
-            this.width = this.data.Size.Width;
-            this.height = this.data.Size.Height;
+        // if (data.Scale) {
+        //     this.scaleX = data.Scale.X;
+        //     this.scaleY = data.Scale.Y;
+        // }
+        // if (data.Rolate && data.Rolate.Z) {
+        //     this.rolate = data.Rolate.Z;
+        // }
+        if (data.Size) {
+            this.width = data.Size.Width;
+            this.height = data.Size.Height;
         }
-        if (this.data.Properties && this.data.Properties.Text) {
-            if (this.data.Properties.Text instanceof String) {
-                this.text = this.data.Properties.Text;
+        if (data.Properties && data.Properties.Text) {
+            if (data.Properties.Text instanceof String) {
+                this.text = data.Properties.Text;
             }
         }
     } // Constructor
@@ -138,8 +139,8 @@ export class STextMarkerItem extends STextItem {
         // 绘制文本
         painter.brush.color = new SColor(this.color);
         painter.font = this.font;
-        painter.scale(this.scaleX, this.scaleY);
-        painter.rotate(this.rolate);
+        // painter.scale(this.scaleX, this.scaleY);
+        // painter.rotate(this.rolate);
         if (this.borderStyle == SLineStyle.Dashed) {
             painter.pen.lineDash = [
                 painter.toPx(this.lineWidth * 3),

+ 1 - 0
src/lib/items/SZoneLegendItem.ts

@@ -62,6 +62,7 @@ export class SZoneLegendItem extends SPolygonItem {
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
         this.data = data;
+        this.id = data.ID;
         if (data) {
             this.setPointList = [];
             let setPointList: SPoint[];

+ 97 - 4
src/lib/items/TipelineItem.ts

@@ -2,6 +2,8 @@ import { SPolylineItem } from '@saga-web/big/lib';
 import { SPainter, SColor } from '@saga-web/draw';
 import { SAnchorItem, SGraphItem } from '@saga-web/graph/lib';
 import { Relation } from '../types/Relation';
+import { SPoint } from "@saga-web/draw/lib";
+import {Point} from "@saga-web/big/lib/types/Point";
 
 /**
  * 管道item
@@ -12,6 +14,61 @@ export class TipelineItem extends SPolylineItem {
   startAnchor: SAnchorItem | null = null;
   /** 结束锚点  */
   endAnchor: SAnchorItem | null = null;
+  /** 对应的图例ID  */
+  _graphElementId: string = "";
+  get graphElementId(): string {
+    return this._graphElementId;
+  }
+  set graphElementId(v: string) {
+    this._graphElementId = v;
+    if (this.data) {
+      this.data.GraphElementId = this._graphElementId;
+    }
+  }
+  /** 关联节点1ID  */
+  _node1Id: string = "";
+  get node1Id(): string {
+    return this._node1Id;
+  }
+  set node1Id(v: string) {
+    this._node1Id = v;
+    if (this.data) {
+      this.data.Node1ID = this._node1Id;
+    }
+  }
+  /** 关联节点2ID  */
+  _node2Id: string = "";
+  get node2Id(): string {
+    return this._node2Id;
+  }
+  set node2Id(v: string) {
+    this._node2Id = v;
+    if (this.data) {
+      this.data.Node2ID = this._node2Id;
+    }
+  }
+  /** 关联锚点1ID  */
+  _anchor1ID: string = "";
+  get anchor1ID(): string {
+    return this._anchor1ID;
+  }
+  set anchor1ID(v: string) {
+    this._anchor1ID = v;
+    if (this.data) {
+      this.data.Anchor1ID = this._anchor1ID;
+    }
+  }
+  /** 关联锚点2ID  */
+  _anchor2ID: string = "";
+  get anchor2ID(): string {
+    return this._anchor2ID;
+  }
+  set anchor2ID(v: string) {
+    this._anchor2ID = v;
+    if (this.data) {
+      this.data.Anchor2ID = this._anchor2ID;
+    }
+  }
   /** 数据存储  */
   data: Relation | null = null;
   /** 接收事件作出修改  */
@@ -32,8 +89,44 @@ export class TipelineItem extends SPolylineItem {
     }
   }
 
-  // constructor(parent: SGraphItem | null, data: Relation) {
-  //   super(parent, data.PointList);
-  //   this.data = data;
-  // }
+  constructor(parent: SGraphItem | null, data: Relation) {
+    super(parent, []);
+    this.pointList = data.PointList.map(item => {
+      return new SPoint(item.X,item.Y);
+    });
+    this.data = data;
+    this.id = data.ID;
+    if (data.GraphElementId) {
+      this._graphElementId = data.GraphElementId
+    }
+    if (data.Node1ID) {
+      this._node1Id = data.Node1ID
+    }
+    if (data.Node2ID) {
+      this._node2Id = data.Node2ID
+    }
+    if (data.Anchor1ID) {
+      this._anchor1ID = data.Anchor1ID
+    }
+    if (data.Anchor2ID) {
+      this._anchor2ID = data.Anchor2ID
+    }
+
+  }
+
+  /** 获取data数据  */
+  getData(): Relation | null {
+    let pointList:Point[] = this.pointList.map(item => {
+      return {
+        X: item.x,
+        Y: item.y
+      }
+    });
+
+    if (this.data) {
+      this.data.PointList = pointList;
+    }
+
+    return this.data
+  }
 }

+ 3 - 1
src/lib/types/Anchor.ts

@@ -18,7 +18,9 @@
  * ********************************************************************************************************************
  */
 
-import { Point } from "../Point";
+
+
+import { Point } from "@saga-web/big/lib/types/Point";
 
 /**
  * 锚点item接口

+ 5 - 3
src/lib/types/ElementData.ts

@@ -18,9 +18,11 @@
  * ********************************************************************************************************************
  */
 
-import { Legend } from "./topology/Legend";
-import { Marker } from "./topology/Marker";
-import { Relation } from "./topology/Relation";
+
+
+import { Legend } from "./Legend";
+import { Marker } from "./Marker";
+import { Relation } from "./Relation";
 
 /**
  * 系统图数据接口

+ 5 - 2
src/lib/types/Legend.ts

@@ -18,10 +18,11 @@
  * ********************************************************************************************************************
  */
 
-import { Point } from "../Point";
-import { Size } from "../Size";
+
 import { Anchor } from "./Anchor";
 import { SGraphElementType } from "./../enums/SGraphElementType";
+import { Point } from "@saga-web/big/lib/types/Point";
+import { Size } from "@saga-web/big/lib/types/Size";
 
 /**
  * 图例节点接口
@@ -39,6 +40,8 @@ export interface Legend {
     GraphElementType: SGraphElementType;
     /** 对应的图例ID  */
     GraphElementId: string;
+    /** 图例数量  */
+    Num?: number;
     /** 位置  */
     Pos: Point;
     /** 缩放  */

+ 5 - 3
src/lib/types/Marker.ts

@@ -18,9 +18,11 @@
  * ********************************************************************************************************************
  */
 
-import { Point } from "../Point";
-import { Size } from "../Size";
-import { SMarkerType } from "../../enums/SMarkerType";
+
+
+import { SMarkerType } from "@saga-web/big/lib/enums/SMarkerType";
+import { Point } from "@saga-web/big/lib/types/Point";
+import { Size } from "@saga-web/big/lib/types/Size";
 
 /**
  * 标识对象接口

+ 5 - 3
src/lib/types/Relation.ts

@@ -18,9 +18,11 @@
  * ********************************************************************************************************************
  */
 
-import { Point } from "../Point";
-import { SRelationDir } from "../../enums/SRelationDir";
-import { SLineType } from "../../enums/SLineType";
+
+
+import { SRelationDir } from "@saga-web/big/lib/enums/SRelationDir";
+import { SLineType } from "@saga-web/big/lib/enums/SLineType";
+import { Point } from "@saga-web/big/lib/types/Point";
 
 /**
  * 管线对象关系接口