瀏覽代碼

Fix collapse mode (nme)

David Catuhe 5 年之前
父節點
當前提交
0f0d546bd5
共有 2 個文件被更改,包括 10 次插入9 次删除
  1. 1 1
      dist/preview release/babylon.js
  2. 9 8
      nodeEditor/src/diagram/graphFrame.ts

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.js


+ 9 - 8
nodeEditor/src/diagram/graphFrame.ts

@@ -134,6 +134,15 @@ export class GraphFrame {
 
         this.cleanAccumulation();
         this._ownerCanvas._frameIsMoving = false;
+
+        // UI        
+        if (this._isCollapsed) {                
+            this._headerCollapseElement.innerHTML = this.ExpandSVG;
+            this._headerCollapseElement.title = "Expand";   
+        } else {
+            this._headerCollapseElement.innerHTML = this.CollapseSVG;
+            this._headerCollapseElement.title = "Collapse";   
+        }
     }
 
     public get nodes() {
@@ -254,14 +263,6 @@ export class GraphFrame {
             evt.stopPropagation();
             this._headerCollapseElement.classList.remove("down");
             this.isCollapsed = !this.isCollapsed;
-
-            if (this.isCollapsed) {                
-                this._headerCollapseElement.innerHTML = this.ExpandSVG;
-                this._headerCollapseElement.title = "Expand";   
-            } else {
-                this._headerCollapseElement.innerHTML = this.CollapseSVG;
-                this._headerCollapseElement.title = "Collapse";   
-            }
         });
         this._headerCollapseElement.innerHTML = this.CollapseSVG;
         this._headerElement.appendChild(this._headerCollapseElement);