mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Allow left-hand node button to act as toggle
This commit is contained in:
		@@ -2442,14 +2442,14 @@ RED.view = (function() {
 | 
			
		||||
                            thisNode.selectAll(".node_button_button").attr("cursor",function(d) {
 | 
			
		||||
                                return (activeSubflow||!isButtonEnabled(d))?"":"pointer";
 | 
			
		||||
                            });
 | 
			
		||||
                            thisNode.selectAll(".node_right_button").attr("transform",function(d){
 | 
			
		||||
                                var x = d.w-6;
 | 
			
		||||
                            thisNode.selectAll(".node_button").attr("transform",function(d){
 | 
			
		||||
                                var x = d._def.align == "right"?d.w-6:-25;
 | 
			
		||||
                                if (d._def.button.toggle && !d[d._def.button.toggle]) {
 | 
			
		||||
                                    x = x - 8;
 | 
			
		||||
                                    x = x - (d._def.align == "right"?8:-8);
 | 
			
		||||
                                }
 | 
			
		||||
                                return "translate("+x+",2)";
 | 
			
		||||
                            });
 | 
			
		||||
                            thisNode.selectAll(".node_right_button rect").attr("fill-opacity",function(d){
 | 
			
		||||
                            thisNode.selectAll(".node_button rect").attr("fill-opacity",function(d){
 | 
			
		||||
                                if (d._def.button.toggle) {
 | 
			
		||||
                                    return d[d._def.button.toggle]?1:0.2;
 | 
			
		||||
                                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user