mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure flow info box updates after editing flow
This commit is contained in:
parent
2453719a87
commit
4b05a9bb6f
@ -134,9 +134,8 @@ RED.sidebar.info = (function() {
|
|||||||
$(propRow.children()[1]).html(' '+(node.label||""))
|
$(propRow.children()[1]).html(' '+(node.label||""))
|
||||||
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.id")+"</td><td></td></tr>").appendTo(tableBody);
|
propRow = $('<tr class="node-info-node-row"><td>'+RED._("sidebar.info.id")+"</td><td></td></tr>").appendTo(tableBody);
|
||||||
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
|
RED.utils.createObjectElement(node.id).appendTo(propRow.children()[1]);
|
||||||
propRow = $('<tr class="node-info-node-row"><td>Enabled</td><td></td></tr>').appendTo(tableBody);
|
propRow = $('<tr class="node-info-node-row"><td>State</td><td></td></tr>').appendTo(tableBody);
|
||||||
RED.utils.createObjectElement((!!!node.disabled)).appendTo(propRow.children()[1]);
|
$(propRow.children()[1]).html((!!!node.disabled)?"Enabled":"Disabled")
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
nodeSection.title.html("Node");
|
nodeSection.title.html("Node");
|
||||||
if (node.type !== "subflow" && node.name) {
|
if (node.type !== "subflow" && node.name) {
|
||||||
|
@ -1056,6 +1056,7 @@ RED.view = (function() {
|
|||||||
selected_link = null;
|
selected_link = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var lastSelection = null;
|
||||||
function updateSelection() {
|
function updateSelection() {
|
||||||
var selection = {};
|
var selection = {};
|
||||||
|
|
||||||
@ -1128,8 +1129,11 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selectionJSON = JSON.stringify(selection);
|
||||||
RED.events.emit("view:selection-changed",selection);
|
if (selectionJSON !== lastSelection) {
|
||||||
|
lastSelection = selectionJSON;
|
||||||
|
RED.events.emit("view:selection-changed",selection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function endKeyboardMove() {
|
function endKeyboardMove() {
|
||||||
|
@ -112,6 +112,10 @@ RED.workspaces = (function() {
|
|||||||
RED.history.push(historyEvent);
|
RED.history.push(historyEvent);
|
||||||
RED.nodes.dirty(true);
|
RED.nodes.dirty(true);
|
||||||
RED.sidebar.config.refresh();
|
RED.sidebar.config.refresh();
|
||||||
|
var selection = RED.view.selection();
|
||||||
|
if (!selection.nodes && !selection.links) {
|
||||||
|
RED.sidebar.info.refresh(workspace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RED.tray.close();
|
RED.tray.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user