Adding Html Buttons/Html Elements inside a Cytoscape node

我与影子孤独终老i 提交于 2019-12-11 09:44:42

问题


How Can I add an Html elements inside a Cytoscape node? E.g: I want to add to every node - 2 small buttons, so the user can click on each one of the buttons and the value inside this node will change.

Example of the graph I want to create

[IMG]http://i57.tinypic.com/1z1bp1l.jpg[/IMG]


回答1:


It's not possible to render HTML in a canvas, nor would you probably want to for performance. If you really want it on the node, I suggest creating an overlay -- though that has its own set of complications in its implementation. Otherwise, you're far better off placing interactive elements separately from a node (e.g. tooltip, sidebar, menu, etc...).



来源:https://stackoverflow.com/questions/25585744/adding-html-buttons-html-elements-inside-a-cytoscape-node

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