how to gray out node images in a vis.js network

守給你的承諾、 提交于 2020-01-05 05:09:11

问题


I've been able to highlight different parts of a vis.js network by utilizing the mechanism shown in the vis.js documentation examples. However,I wonder if we can get the same sort of effect when images are used for representing network nodes -as opposed to basic node shapes- (a straightforward 'coloring' of the nodes, as in the examples, does not gray out the images).


回答1:


I'm the developer of the vis.js network module. Unfortunately there is no shortcut here. You'll have to generate b&w images of your images and change the image option to the greyscale image.

Another idea is to use the opacity, that does work for the images. If you have any more questions, please post them on our github page. We get emails from the issues and we like to use that to keep track of questions.

Cheers!



来源:https://stackoverflow.com/questions/35706830/how-to-gray-out-node-images-in-a-vis-js-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!