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

Font-awesome icons are not rendered in example page

Open ax1 opened this issue 1 year ago • 5 comments

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.

ax1 avatar May 30 '23 16:05 ax1

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.

ax1 avatar May 30 '23 17:05 ax1

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

ax1 avatar May 30 '23 18:05 ax1

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.

Steven0706 avatar Aug 15 '23 19:08 Steven0706