feat: initial node groups #44

Merged
max merged 44 commits from feat/group-node-own into main 2026-05-05 22:08:18 +02:00
Showing only changes of commit 1d60090ffe - Show all commits
@@ -88,7 +88,7 @@ describe('groupSelectedNodes', () => {
const groupNode = state.groupSelectedNodes(); const groupNode = state.groupSelectedNodes();
assert.isDefined(groupNode); assert.isDefined(groupNode);
expect(manager.graph.groups.length).toBe(1); expect(manager.groups.length).toBe(1);
}); });
}); });
@@ -139,26 +139,6 @@ describe('exitGroupNode', () => {
expect(state.cameraPosition).toEqual(before); expect(state.cameraPosition).toEqual(before);
}); });
it('restores the camera position from before entry', () => {
const { manager, state } = createFixture();
const nodeA = manager.createNode({ type: 'test/node/output', position: [0, 0], props: {} });
assert.isDefined(nodeA);
const groupNode = manager.groupNodes([nodeA!.id]);
assert.isDefined(groupNode);
state.activeNodeId = groupNode!.id;
state.cameraPosition = [77, 88, 4];
state.enterGroupNode();
// Simulate camera moving inside the group
state.cameraPosition = [0, 0, 1];
state.exitGroupNode();
expect(state.cameraPosition).toEqual([77, 88, 4]);
});
it('clears activeNodeId and selection after exit', () => { it('clears activeNodeId and selection after exit', () => {
const { manager, state } = createFixture(); const { manager, state } = createFixture();