1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix node toggle button initial opacity

This commit is contained in:
Nick O'Leary 2020-06-18 10:18:35 +01:00
parent 0c90376752
commit 68d3cc7507
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3921,7 +3921,10 @@ RED.view = (function() {
}
this.__buttonGroup__.setAttribute("transform", "translate("+x+",2)");
this.__buttonGroupBackground__.setAttribute("fill-opacity",d._def.button.toggle?(d[d._def.button.toggle]?1:0.2):1)
if (d._def.button.toggle) {
this.__buttonGroupButton__.setAttribute("fill-opacity",d[d._def.button.toggle]?1:0.2)
this.__buttonGroupBackground__.setAttribute("fill-opacity",d[d._def.button.toggle]?1:0.2)
}
if (typeof d._def.button.visible === "function") { // is defined and a function...
if (d._def.button.visible.call(d) === false) {