mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow subflow to be edited if instance exists on locked flow
This commit is contained in:
parent
3630056ed8
commit
dce1cccbde
@ -290,7 +290,7 @@ RED.palette = (function() {
|
||||
revertDuration: 200,
|
||||
containment:'#red-ui-main-container',
|
||||
start: function() {
|
||||
dropEnabled = !RED.nodes.workspace(RED.workspaces.active()).locked;
|
||||
dropEnabled = !(RED.nodes.workspace(RED.workspaces.active())?.locked);
|
||||
paletteWidth = $("#red-ui-palette").width();
|
||||
paletteTop = $("#red-ui-palette").parent().position().top + $("#red-ui-palette-container").position().top;
|
||||
hoverGroup = null;
|
||||
|
@ -273,6 +273,11 @@ RED.subflow = (function() {
|
||||
var subflowInstances = [];
|
||||
if (activeSubflow) {
|
||||
RED.nodes.filterNodes({type:"subflow:"+activeSubflow.id}).forEach(function(n) {
|
||||
const parentFlow = RED.nodes.workspace(n.z)
|
||||
const wasLocked = parentFlow && parentFlow.locked
|
||||
if (wasLocked) {
|
||||
parentFlow.locked = false
|
||||
}
|
||||
subflowInstances.push({
|
||||
id: n.id,
|
||||
changed: n.changed
|
||||
@ -285,6 +290,9 @@ RED.subflow = (function() {
|
||||
n.resize = true;
|
||||
n.dirty = true;
|
||||
RED.editor.updateNodeProperties(n);
|
||||
if (wasLocked) {
|
||||
parentFlow.locked = true
|
||||
}
|
||||
});
|
||||
RED.editor.validateNode(activeSubflow);
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user