mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 16:10:09 +00:00
Fix LGraphNode.pos serialization (#107)
This commit is contained in:
12
test/LGraphNode.test.ts
Normal file
12
test/LGraphNode.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import {
|
||||
LGraphNode,
|
||||
} from "../dist/litegraph.es.js";
|
||||
|
||||
describe("LGraphNode", () => {
|
||||
it("should serialize position correctly", () => {
|
||||
const node = new LGraphNode("TestNode");
|
||||
node.pos = [10, 10];
|
||||
expect(node.pos).toEqual(new Float32Array([10, 10]));
|
||||
expect(node.serialize().pos).toEqual(new Float32Array([10, 10]));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user