mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix node button mouse pointer css
This commit is contained in:
		| @@ -3557,7 +3557,6 @@ RED.view = (function() { | |||||||
|                     bgButton.setAttribute("width",16); |                     bgButton.setAttribute("width",16); | ||||||
|                     bgButton.setAttribute("height",node_height-12); |                     bgButton.setAttribute("height",node_height-12); | ||||||
|                     bgButton.setAttribute("fill", RED.utils.getNodeColor(d.type,d._def)); |                     bgButton.setAttribute("fill", RED.utils.getNodeColor(d.type,d._def)); | ||||||
|                     bgButton.setAttribute("cursor","pointer"); |  | ||||||
|                     d3.select(bgButton) |                     d3.select(bgButton) | ||||||
|                         .on("mousedown",function(d) {if (!lasso && isButtonEnabled(d)) {focusView();d3.select(this).attr("fill-opacity",0.2);d3.event.preventDefault(); d3.event.stopPropagation();}}) |                         .on("mousedown",function(d) {if (!lasso && isButtonEnabled(d)) {focusView();d3.select(this).attr("fill-opacity",0.2);d3.event.preventDefault(); d3.event.stopPropagation();}}) | ||||||
|                         .on("mouseup",function(d) {if (!lasso && isButtonEnabled(d)) { d3.select(this).attr("fill-opacity",0.4);d3.event.preventDefault();d3.event.stopPropagation();}}) |                         .on("mouseup",function(d) {if (!lasso && isButtonEnabled(d)) { d3.select(this).attr("fill-opacity",0.4);d3.event.preventDefault();d3.event.stopPropagation();}}) | ||||||
| @@ -3904,8 +3903,7 @@ RED.view = (function() { | |||||||
|  |  | ||||||
|                         if (d._def.button) { |                         if (d._def.button) { | ||||||
|                             var buttonEnabled = isButtonEnabled(d); |                             var buttonEnabled = isButtonEnabled(d); | ||||||
|                             this.__buttonGroup__.setAttribute("opacity", !buttonEnabled?0.4:1 ); |                             this.__buttonGroup__.classList.toggle("red-ui-flow-node-button-disabled", !buttonEnabled); | ||||||
|                             this.__buttonGroupButton__.setAttribute("cursor",buttonEnabled?"":"pointer"); |  | ||||||
|  |  | ||||||
|                             var x = d._def.align == "right"?d.w-6:-25; |                             var x = d._def.align == "right"?d.w-6:-25; | ||||||
|                             if (d._def.button.toggle && !d[d._def.button.toggle]) { |                             if (d._def.button.toggle && !d[d._def.button.toggle]) { | ||||||
|   | |||||||
| @@ -153,6 +153,15 @@ | |||||||
|  |  | ||||||
| .red-ui-flow-node-button { | .red-ui-flow-node-button { | ||||||
|     fill: inherit; |     fill: inherit; | ||||||
|  |     &.red-ui-flow-node-button-disabled { | ||||||
|  |         opacity: 0.4; | ||||||
|  |         .red-ui-flow-node-button-button { | ||||||
|  |             cursor: default; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | .red-ui-flow-node-button-button { | ||||||
|  |     cursor: pointer; | ||||||
| } | } | ||||||
| .red-ui-flow-node-button-background { | .red-ui-flow-node-button-background { | ||||||
|     fill: $node-background-placeholder; |     fill: $node-background-placeholder; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user