Make debug button move/partially hide when disabled to make it obvious. Also thicken border of node selected from within debug window - again to make it "pop" so it is obvious. Fixes #47

This commit is contained in:
Dave C-J 2013-10-28 10:01:12 +00:00
parent deef63334f
commit 87fdc74ed0
3 changed files with 51 additions and 48 deletions

View File

@ -62,6 +62,9 @@
color: function() { color: function() {
return (typeof this.active === 'undefined') ? ("#87a980" ) : (this.active ? "#87a980" : "#b9b9b9"); return (typeof this.active === 'undefined') ? ("#87a980" ) : (this.active ? "#87a980" : "#b9b9b9");
}, },
wide: function() {
return (typeof this.active === 'undefined') ? 100 : (this.active ? 100 : 110);
},
onclick: function() { onclick: function() {
var label = this.name||"debug"; var label = this.name||"debug";
var node = this; var node = this;

View File

@ -755,8 +755,8 @@ RED.view = function() {
}); });
thisNode.selectAll(".node_icon").attr("height",function(d){return Math.min(50,d.h);}).attr("y",function(d){return (d.h-Math.min(50,d.h))/2;}); thisNode.selectAll(".node_icon").attr("height",function(d){return Math.min(50,d.h);}).attr("y",function(d){return (d.h-Math.min(50,d.h))/2;});
thisNode.selectAll('.node_right_button_group').attr("transform",function(d){return "translate("+(d.w-100)+","+0+")";}); thisNode.selectAll('.node_right_button_group').attr("transform",function(d){return "translate("+(d.w - d._def.button.wide.call(d))+","+0+")";});
thisNode.selectAll('.node_right_button').attr("transform",function(d){return "translate("+(d.w-100)+","+0+")";}).attr("fill",function(d) { thisNode.selectAll('.node_right_button').attr("transform",function(d){return "translate("+(d.w - d._def.button.wide.call(d))+","+0+")";}).attr("fill",function(d) {
return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color) return typeof d._def.button.color === "function" ? d._def.button.color.call(d):(d._def.button.color != null ? d._def.button.color : d._def.color)
}); });

View File

@ -318,7 +318,8 @@ a.brand img {
stroke: #ff7f0e; stroke: #ff7f0e;
} }
.node_highlighted { .node_highlighted {
stroke: #ff0000; stroke: #a51616;
stroke-width: 4;
} }
.node_hovered { .node_hovered {
dstroke: #ff7f0e; dstroke: #ff7f0e;
@ -552,7 +553,6 @@ div.node-info {
#node-select-library li.list-hover { #node-select-library li.list-hover {
background: #ffffd0; background: #ffffd0;
} }
.node-text-editor { .node-text-editor {
border:1px solid #ccc; border:1px solid #ccc;
border-radius:5px; border-radius:5px;