mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): adding node selects new node exclusively
This commit is contained in:
parent
4be4fc6731
commit
4ac41bc4b1
@ -144,6 +144,18 @@ const nodesSlice = createSlice({
|
|||||||
node.position.y
|
node.position.y
|
||||||
);
|
);
|
||||||
node.position = position;
|
node.position = position;
|
||||||
|
node.selected = true;
|
||||||
|
|
||||||
|
state.nodes = applyNodeChanges(
|
||||||
|
state.nodes.map((n) => ({ id: n.id, type: 'select', selected: false })),
|
||||||
|
state.nodes
|
||||||
|
);
|
||||||
|
|
||||||
|
state.edges = applyEdgeChanges(
|
||||||
|
state.edges.map((e) => ({ id: e.id, type: 'select', selected: false })),
|
||||||
|
state.edges
|
||||||
|
);
|
||||||
|
|
||||||
state.nodes.push(node);
|
state.nodes.push(node);
|
||||||
|
|
||||||
if (!isInvocationNode(node)) {
|
if (!isInvocationNode(node)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user