Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/persagy_topo_editer into develop

haojianlong 4 years ago
parent
commit
8bae90cd71

+ 0 - 22
src/components/editClass/big-edit/SBaseEditScene.ts

@@ -31,7 +31,6 @@ import { SItemStatus, SRectSelectItem } from '@persagy-web/big/lib';
 import { SGraphItem, SGraphSelectContainer, SOrderSetType } from "@persagy-web/graph/lib/";
 import { uuid } from "./until";
 import { SBaseArrow, SBaseEquipment, SBaseExpainEdit, SBasePipeUninTool, SBasePipe } from "./"
-import { PTopoParser } from "./../persagy-edit/"
 import { SBaseArrowPolyEdit } from './items/SBaseArrowPolyEdit';
 import { SGraphAddListCommand } from '../edit/commands/SGraphAddListCommand';
 
@@ -486,28 +485,7 @@ export class SBaseEditScene extends SGraphEditScene {
         }
     }
 
-    /**
-     * 粘贴
-     */
-    paste(): void {
-        const copyList = JSON.parse(JSON.stringify(this.copyString));
-        const parserData = new PTopoParser();
-        const graphItemList: SGraphEdit[] = [];
-        parserData.parseData(copyList);
-        parserData.markers.forEach((item: SGraphEdit) => {
-            item.selectable = true;
-            item.moveable = true;
-            if (this.view) {
-                item.pos.x += 10 / this.view.scale
-                item.pos.y += 10 / this.view.scale
-            }
-            this.addItem(item);
-            graphItemList.push(item);
-        });
 
-        this.addListCommand(graphItemList);
-        this.view ? this.view.update() : '';
-    }
 
     /**
      * 添加多个item命令

+ 1 - 1
src/components/editClass/big-edit/items/SBaseArrow.ts

@@ -24,7 +24,7 @@
  * *********************************************************************************************************************
  */
 
-import { SColor, SFont, SPainter, SArrowStyleType } from "@persagy-web/draw/";
+import { SPainter, SArrowStyleType } from "@persagy-web/draw/";
 import { SBasePolylineEdit } from "@persagy-web/edit";
 import { SGraphItem, SLineStyle } from "@persagy-web/graph/lib";
 import { Marker } from "./../types/Marker";

+ 1 - 1
src/components/editClass/big-edit/items/SBaseObjectRelation.ts

@@ -26,7 +26,7 @@
 
 import { SColor, SPainter, SPoint } from '@persagy-web/draw/lib';
 import { SGraphItem } from '@persagy-web/graph/lib';
-import { SLineStyle } from '../../edit/enums/SLineStyle';
+import { SLineStyle } from '@persagy-web/edit/lib/enums/SLineStyle';
 
 /**
  * 对象关系 虚线 item

+ 24 - 0
src/components/editClass/persagy-edit/PTopoScene.ts

@@ -32,6 +32,7 @@ import { rgbaNum } from "./../big-edit/until";
 // 引入命令
 import { SGraphAddCommand } from "./../edit/commands/SGraphAddCommand"
 import { SColor, SFont, SArrowStyleType } from '@persagy-web/draw/lib';
+import { PTopoParser } from "./"
 
 /**
  * 拓扑图场景类
@@ -305,4 +306,27 @@ export class PTopoScene extends SBaseEditScene {
             relations
         }
     }
+
+    /**
+     * 粘贴
+     */
+    paste(): void {
+        const copyList = JSON.parse(JSON.stringify(this.copyString));
+        const parserData = new PTopoParser();
+        const graphItemList: SGraphEdit[] = [];
+        parserData.parseData(copyList);
+        parserData.markers.forEach((item: SGraphEdit) => {
+            item.selectable = true;
+            item.moveable = true;
+            if (this.view) {
+                item.pos.x += 10 / this.view.scale
+                item.pos.y += 10 / this.view.scale
+            }
+            this.addItem(item);
+            graphItemList.push(item);
+        });
+
+        this.addListCommand(graphItemList);
+        this.view ? this.view.update() : '';
+    }
 }