Browse Source

版本升级;修改parent传入但未赋值bug

haojianlong 5 years ago
parent
commit
708b7c30ee
2 changed files with 6 additions and 3 deletions
  1. 1 1
      saga-web-graphy/package.json
  2. 5 2
      saga-web-graphy/src/SGraphyItem.ts

+ 1 - 1
saga-web-graphy/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/graphy",
-    "version": "2.1.42",
+    "version": "2.1.44",
     "description": "上格云二维图形引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",

+ 5 - 2
saga-web-graphy/src/SGraphyItem.ts

@@ -135,6 +135,9 @@ export class SGraphyItem extends SObject {
      */
     constructor(parent: SGraphyItem | null = null) {
         super();
+        if (parent) {
+            this.parent = parent;
+        }
     } // Function constructor()
 
     /**
@@ -198,9 +201,9 @@ export class SGraphyItem extends SObject {
      * 更新Item
      */
     update(): void {
-        if(null != this.scene) {
+        if (null != this.scene) {
             const view = this.scene.view;
-            if(null != view) {
+            if (null != view) {
                 view.update();
             }
         }