Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to rotate FontAwesome icons with visNetwork? #465

Open
gilliganondata opened this issue Apr 7, 2024 · 0 comments
Open

Is it possible to rotate FontAwesome icons with visNetwork? #465

gilliganondata opened this issue Apr 7, 2024 · 0 comments

Comments

@gilliganondata
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant