vis-network icon indicating copy to clipboard operation
vis-network copied to clipboard

Node icon ignoring changing options

Open nikimicallef opened this issue 3 years ago • 0 comments

Hi. I am using a Vis JS network (within an Angular application) with some nodes being set to Font Awesome icons and it is working fine upon rendering.

The issue is though that I want to change the opacity of the node on click and this is being ignored. I have managed to do this for non-icon nodes with something like

const color = rgba(169,169,169,${serviceLandscapeFilter[group] ? 1.0 : 0.2});
nodeToUpdate.color = { background: color, border: color };

however this totally doesn't work with icons. I've noticed that icons tend to ignore anything which is not inside the icons option group because I have also disabled the chosen option (nodes: { chosen: false }) which is ignored by the icon.

Any way I can change the color/opacity of an icon after rendering?

nikimicallef avatar Nov 12 '21 07:11 nikimicallef