瀏覽代碼

Add frame comments parse/serialization

Kyle Belfort 5 年之前
父節點
當前提交
f28ab84c02
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. 3 1
      nodeEditor/src/diagram/graphFrame.ts
  2. 4 3
      nodeEditor/src/nodeLocationInfo.ts

+ 3 - 1
nodeEditor/src/diagram/graphFrame.ts

@@ -498,7 +498,8 @@ export class GraphFrame {
             color: this._color.asArray(),
             name: this.name,
             isCollapsed: this.isCollapsed,
-            blocks: this.nodes.map(n => n.block.uniqueId)
+            blocks: this.nodes.map(n => n.block.uniqueId),
+            comments: this._comments
         }
     }
 
@@ -518,6 +519,7 @@ export class GraphFrame {
         newFrame.height = serializationData.height;
         newFrame.name = serializationData.name;
         newFrame.color = Color3.FromArray(serializationData.color);
+        newFrame.comments = serializationData.comments;
 
         if (serializationData.blocks && map) {
             for (var blockId of serializationData.blocks) {

+ 4 - 3
nodeEditor/src/nodeLocationInfo.ts

@@ -10,9 +10,10 @@ export interface IFrameData {
     width: number;
     height: number;
     color: number[];
-    name: string,
-    isCollapsed: boolean,
-    blocks: number[]
+    name: string;
+    isCollapsed: boolean;
+    blocks: number[];
+    comments: string;
 }
 
 export interface IEditorData {