Browse Source

更新底层包

haojianlong 4 years ago
parent
commit
8c129cc5ae

+ 5 - 5
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/topology",
-    "version": "1.0.84",
+    "version": "1.0.85",
     "description": "上格云拓扑图引擎",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -17,7 +17,7 @@
     "author": "郝建龙 (1061851420@qq.com)",
     "license": "ISC",
     "publishConfig": {
-        "registry": "http://192.168.200.80:8081/repository/npm-hosted/"
+        "registry": "http://dev.dp.sagacloud.cn:8082/repository/npm-hosted/"
     },
     "files": [
         "lib"
@@ -33,9 +33,9 @@
         "typescript": "^3.5.3"
     },
     "dependencies": {
-        "@saga-web/base": "2.1.9",
-        "@saga-web/draw": "2.1.82",
-        "@saga-web/graphy": "2.1.54",
+        "@saga-web/base": "2.1.27",
+        "@saga-web/draw": "2.1.108",
+        "@saga-web/graph": "2.1.127",
         "axios": "^0.18.0",
         "pako": "^1.0.10",
         "poly-decomp": "^0.3.0",

+ 6 - 6
src/TopoScene.ts

@@ -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

+ 2 - 2
src/TopoView.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyView } from "@saga-web/graphy/lib";
+import { SGraphView } from "@saga-web/graph/lib";
 import { SMouseButton, SMouseEvent, SNetUtil } from "@saga-web/base/lib";
 import { SPoint } from "@saga-web/draw/lib";
 
@@ -27,7 +27,7 @@ import { SPoint } from "@saga-web/draw/lib";
  *
  * @author  郝建龙
  */
-export class TopoView extends SGraphyView {
+export class TopoView extends SGraphView {
     /** 鼠标左键键按下时位置 */
     private _leftKeyPos = new SPoint();
     /** 空格是否被按下 */

+ 3 - 3
src/items/AnchorItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Anchor } from "../types/Anchor";
 
@@ -27,7 +27,7 @@ import { Anchor } from "../types/Anchor";
  *
  * @author  郝建龙
  */
-export class AnchorItem extends SGraphyItem {
+export class AnchorItem extends SGraphItem {
     /** 所有数据    */
     data: Anchor | null = null;
     /** 相对于父级的x坐标   */
@@ -46,7 +46,7 @@ export class AnchorItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      Relation数据
      */
-    constructor(parent: SGraphyItem | null, data: Anchor) {
+    constructor(parent: SGraphItem | null, data: Anchor) {
         super(parent);
         this.data = data;
         this.X = data.Pos.X;

+ 2 - 2
src/items/BaseRelationItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Relation } from "../types/Relation";
 import { SMouseEvent } from "@saga-web/base/lib";
@@ -28,7 +28,7 @@ import { SMouseEvent } from "@saga-web/base/lib";
  *
  * @author  郝建龙
  */
-export class BaseRelationItem extends SGraphyItem {
+export class BaseRelationItem extends SGraphItem {
     /** X坐标最小值  */
     minX = Number.MAX_SAFE_INTEGER;
     /** X坐标最大值  */

+ 2 - 2
src/items/DirectRelationItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SLine, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Relation } from "../types/Relation";
 import { SMouseEvent } from "@saga-web/base/lib";
@@ -65,7 +65,7 @@ export class DirectRelationItem extends BaseRelationItem {
      * @param parent    指向父对象
      * @param data      Relation数据
      */
-    constructor(parent: SGraphyItem | null, data: Relation) {
+    constructor(parent: SGraphItem | null, data: Relation) {
         super(parent);
         this.data = data;
         this.selectable = true;

+ 3 - 3
src/items/EquipItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { Equip } from "../types/Equip";
@@ -30,7 +30,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class EquipItem extends SGraphyItem {
+export class EquipItem extends SGraphItem {
     /** 宽度  */
     _width: number = 400;
     /** X轴坐标 */
@@ -84,7 +84,7 @@ export class EquipItem extends SGraphyItem {
     /** 展示的图片路径 */
     Img: CanvasImageSource | undefined;
 
-    constructor(parent: SGraphyItem | null, data: Equip) {
+    constructor(parent: SGraphItem | null, data: Equip) {
         super(parent);
         if (data.Size.Width) {
             this.width = data.Size.Width;

+ 2 - 2
src/items/RelationItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SLine, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Relation } from "../types/Relation";
 import { SMouseEvent } from "@saga-web/base/lib";
@@ -62,7 +62,7 @@ export class RelationItem extends BaseRelationItem {
      * @param parent    指向父对象
      * @param data      Relation数据
      */
-    constructor(parent: SGraphyItem | null, data: Relation) {
+    constructor(parent: SGraphItem | null, data: Relation) {
         super(parent);
         this.data = data;
         this.Anchor1 = data.Anchor1 || null;