vis-network
vis-network copied to clipboard
Font-awesome icons are not rendered in example page
In the documentation at https://visjs.github.io/vis-network/examples/network/nodeStyles/customGroups.html the FA icons are not properly displayed. I changed to https:...fontawesome css in firefox and seemed to solve it but in chrome browser the problem is the same. Also tested using `document.addEventListener("DOMContentLoaded",...) in a local page but same results.
issue #163 contains a link to https://visjs.github.io/vis-network/examples/network/nodeStyles/icons.html where fa-icons (v4 and v5) are displayed, I will try that code instead.
Anyway having a look/fix at the first URL would be great since we cannot pull-request to gh-pages (doc says that non-master PRs will be closed). The example pages are very convenient as templates.
Thanks.
Ok, document.fonts.load('normal normal 400 24px/1 "FontAwesome"').then(paint).catch(console.error)
solves the problem.
For those reading the issue, you can also use the newer fa version 5 in icons.html
.
(I leave the issue as open for some days, just in case any contributor wants to update the customGroups example file.)
https://jsfiddle.net/api/post/library/pure/ can someone please help fix this example? having the same issue but not sure how above solution can be applied to here.