Browse Source

设置矩形 多边形圆 箭头层级一致

haojianlong 4 years ago
parent
commit
ded146d068
1 changed files with 11 additions and 9 deletions
  1. 11 9
      src/components/editClass/persagy-edit/PTopoScene.ts

+ 11 - 9
src/components/editClass/persagy-edit/PTopoScene.ts

@@ -27,12 +27,11 @@ import { SBaseEditScene, SBasePipe, SBaseEquipment } from "@persagy-web/big-edit
 import { SGraphEdit } from "@persagy-web/edit";
 import { SMouseEvent } from "@persagy-web/base/lib";
 import { SGraphAddCommand, SGraphPropertyCommand, SGraphSelectContainer, SLineStyle } from "@persagy-web/graph";
-import { SItemStatus } from "@persagy-web/big/lib/enums/SItemStatus";
 import { rgbaNum } from "@persagy-web/big-edit/lib/until";
 // 引入命令
 import { SColor, SFont, SArrowStyleType } from '@persagy-web/draw/lib';
 import { PTopoParser, SBasePipeUninTool, SBaseEquation, SBaseInfoPoint, SBaseBtns } from "./"
-import { ItemOrder } from '@persagy-web/big/lib';
+import { ItemOrder, SItemStatus } from '@persagy-web/big/lib';
 
 /**
  * 拓扑图场景类
@@ -134,21 +133,24 @@ export class PTopoScene extends SBaseEditScene {
             this.addImageItem(event)
             this.clearCmdStatus();
         }
-        else if (this.editCmd == "EditBasePolygon") {
+        else if (this.editCmd == "EditBasePolygon") { //
             this.addPolygonItem(event);
             this.clearCmdStatus();
-        } else if (this.editCmd == "EditBaseRect") {
-            this.addRectItem(event)
+        } else if (this.editCmd == "EditBaseRect") { // 设置层级与多边形一致
+            const item = this.addRectItem(event)
+            item.zOrder = ItemOrder.polygonOrder;
             this.clearCmdStatus();
         } else if (this.editCmd == "EditBaseTriangle") {
             this.addTriangleItem(event)
             this.clearCmdStatus();
-        } else if (this.editCmd == "EditBaseCircle") {
-            this.addCircleItem(event)
+        } else if (this.editCmd == "EditBaseCircle") { // 设置层级与多边形一致
+            const item = this.addCircleItem(event)
+            item.zOrder = ItemOrder.polygonOrder
             this.clearCmdStatus();
         }
-        else if (this.editCmd == "EditBaseArrows") {
-            this.addPolygonArrow(event)
+        else if (this.editCmd == "EditBaseArrows") { // 设置层级与多边形一致
+            const item = this.addPolygonArrow(event)
+            item.zOrder = ItemOrder.polygonOrder
             this.clearCmdStatus();
         }
         else if (this.editCmd == "wantou" || this.editCmd == "santong" || this.editCmd == "sitong") {