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,
|
revertDuration: 200,
|
||||||
containment:'#red-ui-main-container',
|
containment:'#red-ui-main-container',
|
||||||
start: function() {
|
start: function() {
|
||||||
dropEnabled = !RED.nodes.workspace(RED.workspaces.active()).locked;
|
dropEnabled = !(RED.nodes.workspace(RED.workspaces.active())?.locked);
|
||||||
paletteWidth = $("#red-ui-palette").width();
|
paletteWidth = $("#red-ui-palette").width();
|
||||||
paletteTop = $("#red-ui-palette").parent().position().top + $("#red-ui-palette-container").position().top;
|
paletteTop = $("#red-ui-palette").parent().position().top + $("#red-ui-palette-container").position().top;
|
||||||
hoverGroup = null;
|
hoverGroup = null;
|
||||||
|
@ -273,6 +273,11 @@ RED.subflow = (function() {
|
|||||||
var subflowInstances = [];
|
var subflowInstances = [];
|
||||||
if (activeSubflow) {
|
if (activeSubflow) {
|
||||||
RED.nodes.filterNodes({type:"subflow:"+activeSubflow.id}).forEach(function(n) {
|
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({
|
subflowInstances.push({
|
||||||
id: n.id,
|
id: n.id,
|
||||||
changed: n.changed
|
changed: n.changed
|
||||||
@ -285,6 +290,9 @@ RED.subflow = (function() {
|
|||||||
n.resize = true;
|
n.resize = true;
|
||||||
n.dirty = true;
|
n.dirty = true;
|
||||||
RED.editor.updateNodeProperties(n);
|
RED.editor.updateNodeProperties(n);
|
||||||
|
if (wasLocked) {
|
||||||
|
parentFlow.locked = true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
RED.editor.validateNode(activeSubflow);
|
RED.editor.validateNode(activeSubflow);
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user