Explorar o código

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

haojianlong %!s(int64=4) %!d(string=hai) anos
pai
achega
5721aaf4e1
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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 对象边界区域