Small refactoring

This commit is contained in:
barsdeveloper
2024-09-08 22:28:42 +02:00
parent 2114abef5c
commit 19ef3bd10e
43 changed files with 542 additions and 504 deletions

View File

@@ -54,11 +54,11 @@ export default class Paste extends IInput {
this.blueprint.unselectAll()
}
let mousePosition = this.blueprint.mousePosition
nodes.forEach(node => {
for (const node of nodes) {
node.addLocation(mousePosition[0] - left, mousePosition[1] - top)
node.snapToGrid()
node.setSelected(true)
})
}
this.blueprint.addGraphElement(...nodes)
return nodes
}