1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add flows:reorder event

This commit is contained in:
Nick O'Leary 2020-04-27 10:49:54 +01:00
parent f78be9050a
commit 2069cc4392
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -348,6 +348,9 @@ RED.nodes = (function() {
workspacesOrder.splice(targetIndex,0,ws.id); workspacesOrder.splice(targetIndex,0,ws.id);
} }
RED.events.emit('flows:add',ws); RED.events.emit('flows:add',ws);
if (targetIndex !== undefined) {
RED.events.emit('flows:reorder',workspacesOrder)
}
} }
function getWorkspace(id) { function getWorkspace(id) {
return workspaces[id]; return workspaces[id];