Selaa lähdekoodia

'选中图标提高zorder层级'

zhangyu 5 vuotta sitten
vanhempi
commit
c7e1c47fdd
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      saga-web-big/src/items/SIconTextItem.ts

+ 4 - 2
saga-web-big/src/items/SIconTextItem.ts

@@ -5,7 +5,7 @@ import {
     SAnchorItem,
     SGraphItem
 } from "@saga-web/graph/lib";
-import { SItemStatus } from "..";
+import { SItemStatus, ItemOrder } from "..";
 import { SMouseEvent } from "@saga-web/base";
 import { SSize, SRect, SPainter, SColor, SFont, SPoint } from "@saga-web/draw";
 import { Anchor } from "../types/topology/Anchor";
@@ -67,8 +67,10 @@ export class SIconTextItem extends SObjectItem {
         this._selected = value;
         if (value) {
             this.img.scale = 1.25;
+            this.zOrder = ItemOrder.highLightOrder;
         } else {
-            this.img.scale = 1
+            this.img.scale = 1;
+            this.zOrder = ItemOrder.markOrder;
         }
         this.update();
     } // Set selected