Fix comments dragging nodes

This commit is contained in:
barsdeveloper
2022-12-15 21:00:20 +01:00
parent 4bc87263f1
commit 69d274e9cf
18 changed files with 151 additions and 114 deletions

View File

@@ -45,7 +45,6 @@ export default class Paste extends IInput {
if (nodes.length > 0) {
this.blueprint.unselectAll()
}
this.blueprint.addGraphElement(...nodes)
let mousePosition = this.blueprint.mousePosition
nodes.forEach(node => {
const locationOffset = [
@@ -56,6 +55,7 @@ export default class Paste extends IInput {
node.snapToGrid()
node.setSelected(true)
})
this.blueprint.addGraphElement(...nodes)
return true
}
}

View File

@@ -30,7 +30,7 @@ export default class MouseMoveNodes extends MouseMoveDraggable {
.filter(comment => !node.isInsideComment(comment))
.forEach(comment => node.unbindFromComment(comment))
)
this.blueprint.getCommentNodes(true).forEach(comment =>
this.blueprint.getCommentNodes().forEach(comment =>
/** @type {CommentNodeTemplate} */(comment.template).manageNodesBind()
)
}