Fix LGraphNode.pos serialization (#107)

This commit is contained in:
Chenlei Hu
2024-09-02 14:31:05 -04:00
committed by GitHub
parent 8a8ebb4906
commit e25c21026c
2 changed files with 14 additions and 2 deletions

View File

@@ -2348,8 +2348,8 @@ const globalExport = {};
this.title = title || "Unnamed";
this.size = [LiteGraph.NODE_WIDTH, 60];
this.graph = null;
this._pos = new Float32Array(10, 10);
// Initialize _pos with a Float32Array of length 2, default value [10, 10]
this._pos = new Float32Array([10, 10]);
Object.defineProperty(this, "pos", {
set: function (v) {