Merge branch 'master' into add-editorTheme-custom-label-default-deploy-button

This commit is contained in:
matiseni51 2025-02-03 20:52:23 +01:00 committed by GitHub
commit f4c184af4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2170,19 +2170,24 @@ RED.view = (function() {
n.n.moved = true;
}
}
// Check to see if we need to splice a link
// If a node has moved and ends up being spliced into a link, keep
// track of which historyEvent to add the splice info to
let targetSpliceEvent = null
if (moveEvent.nodes.length > 0) {
historyEvent.events.push(moveEvent)
if (activeSpliceLink) {
var linkToSplice = d3.select(activeSpliceLink).data()[0];
spliceLink(linkToSplice, movingSet.get(0).n, moveEvent)
}
targetSpliceEvent = moveEvent
}
if (moveAndChangedGroupEvent.nodes.length > 0) {
historyEvent.events.push(moveAndChangedGroupEvent)
targetSpliceEvent = moveAndChangedGroupEvent
}
// activeSpliceLink will only be set if the movingSet has a single
// node that is able to splice.
if (targetSpliceEvent && activeSpliceLink) {
var linkToSplice = d3.select(activeSpliceLink).data()[0];
spliceLink(linkToSplice, movingSet.get(0).n, targetSpliceEvent)
}
// Only continue if something has moved
if (historyEvent.events.length > 0) {
RED.nodes.dirty(true);