mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -526,7 +526,7 @@ RED.editor = (function() {
|
||||
} else if (node.type.indexOf("subflow:")===0) {
|
||||
var subflow = RED.nodes.subflow(node.type.substring(8));
|
||||
label = RED._("subflow.editSubflowInstance",{name:RED.utils.sanitize(subflow.name)})
|
||||
} else {
|
||||
} else if (node._def !== undefined) {
|
||||
if (typeof node._def.paletteLabel !== "undefined") {
|
||||
try {
|
||||
label = RED.utils.sanitize((typeof node._def.paletteLabel === "function" ? node._def.paletteLabel.call(node._def) : node._def.paletteLabel)||"");
|
||||
|
@@ -152,7 +152,7 @@ RED.palette = (function() {
|
||||
function getPaletteNode(type) {
|
||||
return $(".red-ui-palette-node[data-palette-type='"+type+"']");
|
||||
}
|
||||
|
||||
|
||||
function addNodeType(nt,def) {
|
||||
if (getPaletteNode(nt).length) {
|
||||
return;
|
||||
@@ -241,7 +241,6 @@ RED.palette = (function() {
|
||||
RED.sidebar.info.set(helpText,RED._("sidebar.info.nodeHelp"));
|
||||
});
|
||||
var chart = $("#red-ui-workspace-chart");
|
||||
var chartOffset = chart.offset();
|
||||
var chartSVG = $("#red-ui-workspace-chart>svg").get(0);
|
||||
var activeSpliceLink;
|
||||
var mouseX;
|
||||
@@ -265,8 +264,8 @@ RED.palette = (function() {
|
||||
ui.originalPosition.left = $('#' + e.target.id).offset().left;
|
||||
|
||||
if (def.inputs > 0 && def.outputs > 0) {
|
||||
mouseX = ui.position.left-paletteWidth+(ui.helper.width()/2) - chartOffset.left + chart.scrollLeft();
|
||||
mouseY = ui.position.top-paletteTop+(ui.helper.height()/2) - chartOffset.top + chart.scrollTop();
|
||||
mouseX = ui.position.left - paletteWidth + (ui.helper.width()/2) + chart.scrollLeft();
|
||||
mouseY = ui.position.top - paletteTop + (ui.helper.height()/2) + chart.scrollTop();
|
||||
if (!spliceTimer) {
|
||||
spliceTimer = setTimeout(function() {
|
||||
var nodes = [];
|
||||
|
@@ -3166,7 +3166,7 @@ RED.view = (function() {
|
||||
var statusClass = "red-ui-flow-node-status-"+(d.status.shape||"dot")+"-"+d.status.fill;
|
||||
thisNode.selectAll(".red-ui-flow-node-status").style("display","inline").attr("class","red-ui-flow-node-status "+statusClass);
|
||||
}
|
||||
if (d.status.text) {
|
||||
if (d.status.hasOwnProperty('text')) {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-label").text(d.status.text);
|
||||
} else {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-label").text("");
|
||||
|
Reference in New Issue
Block a user