Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David `Deltakosh` Catuhe 5 years ago
parent
commit
687f69a3d5
2 changed files with 13 additions and 7 deletions
  1. 12 6
      nodeEditor/src/diagram/graphFrame.ts
  2. 1 1
      src/Meshes/Builders/capsuleBuilder.ts

+ 12 - 6
nodeEditor/src/diagram/graphFrame.ts

@@ -1266,11 +1266,17 @@ export class GraphFrame {
     }
 
     public dispose() {
-        this.isCollapsed = false;
-        
-        this._nodes.forEach(node => {
-            node.enclosingFrameId = -1;
-        });
+        if(this.isCollapsed) {
+            while(this._nodes.length > 0) {
+                this._nodes[0].dispose();
+            }
+            this.isCollapsed = false;
+        }
+        else {
+            this._nodes.forEach(node => {
+                node.enclosingFrameId = -1;
+            });
+        }
 
         if (this._onSelectionChangedObserver) {
             this._ownerCanvas.globalState.onSelectionChangedObservable.remove(this._onSelectionChangedObserver);
@@ -1299,7 +1305,7 @@ export class GraphFrame {
             height: this._height,
             color: this._color.asArray(),
             name: this.name,
-            isCollapsed: false, //keeping closed to make reimporting cleaner
+            isCollapsed: true, //keeping closed to make reimporting cleaner
             blocks: this.nodes.map(n => n.block.uniqueId),
             comments: this._comments
         }

+ 1 - 1
src/Meshes/Builders/capsuleBuilder.ts

@@ -232,7 +232,7 @@ export interface ICreateCapsuleOptions{
     /** Radius of the capsule. */
     radius: number;
 
-    /** Height or Length of the capsule. */
+    /** Number of sub segments on the cap sections of the capsule running parallel to orientation. */
     capSubdivisions: number;
 
     /** Overwrite for the top radius. */