Fix properties panel reactivity: spread node objects in computed
Vue's computed caching compares array contents by reference. Since graph.getNode() returns the same mutable object, the computed saw no change even when properties were mutated. Spreading creates new objects so Vue detects the difference.
This commit is contained in:
parent
3c7ff3ecd1
commit
639a2a943e
|
|
@ -103,7 +103,7 @@ export function createEditorStore() {
|
|||
const nodes: SceneNode[] = []
|
||||
for (const id of state.selectedIds) {
|
||||
const n = graph.getNode(id)
|
||||
if (n) nodes.push(n)
|
||||
if (n) nodes.push({ ...n })
|
||||
}
|
||||
return nodes
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue