visNetwork icon indicating copy to clipboard operation
visNetwork copied to clipboard

Is it possible to rotate FontAwesome icons with visNetwork?

Open gilliganondata opened this issue 10 months ago • 0 comments

I have a specific need for a fa-square (f0c8) to be rotated 45 degrees, and I have been unable to make that happen.

I'm starting to think that the only manipulations to an icon available are: code (the icon), size, and color.

I'm trying to do the definition within the nodes, and I can get those basic attributes working fine, but I've had no luck getting the rotate functionality to work. Much of the documentation (including https://docs.fontawesome.com/web/style/rotate) speaks to rotating via CSS, but, since the visNetwork output is a rendered canvas, that doesn't seem to work.

I was hoping that I could add something like:

icon.transform = "rotate-45"

or

icon.rotate = "45deg"

But neither of those has any effect. Nor does adding rotation details (or any formatting) to the CSS (which I think makes sense).

gilliganondata avatar Apr 07 '24 14:04 gilliganondata