Sfoglia il codice sorgente

graph:feat:item增加自身子类方法

haojianlong 4 anni fa
parent
commit
5721aaf4e1
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      persagy-web-graph/src/SGraphItem.ts

+ 9 - 0
persagy-web-graph/src/SGraphItem.ts

@@ -315,6 +315,15 @@ export class SGraphItem extends SObject {
     }
 
     /**
+     * 在此层级下添加 item
+     *
+     * @param item  要添加的 item
+     */
+    addItem(item: SGraphItem): void {
+        item.parent = this;
+    }
+
+    /**
      * Item 对象边界区域
      *
      * @return 对象边界区域