在Cytoscape节点内添加HTML按钮/ HTML元素 [英] Adding Html Buttons/Html Elements inside a Cytoscape node

查看:143
本文介绍了在Cytoscape节点内添加HTML按钮/ HTML元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Cytoscape节点内添加HTML元素?
例如:我想向每个节点添加-2个小按钮,因此用户可以单击每个按钮,此节点内的值将更改。

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.

我要创建的图形示例

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

推荐答案

无法在画布中呈现HTML,也可能不需要提高性能。如果您确实希望在节点上使用它,我建议您创建一个叠加层,尽管这种叠加层在实现上有其自身的复杂性。否则,您最好将交互式元素与节点分开放置(例如,工具提示,侧边栏,菜单等)。

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

这篇关于在Cytoscape节点内添加HTML按钮/ HTML元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆