Explorar el Código

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

haojianlong hace 4 años
padre
commit
5721aaf4e1
Se han modificado 1 ficheros con 9 adiciones y 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 对象边界区域