【发布时间】:2014-07-31 19:03:26
【问题描述】:
在这里您可以找到带有可编辑标签的图表(使用 SVG foreinobject)。
nodes.append("foreignObject")
.attr({width: 100, height: 100})
.append("xhtml:body")
.append("xhtml:span")
.attr("contenteditable", true)
.html(function(d) { return d.name })
.on("keyup", function(d, i)
{
console.log(d3.select(this).text());
});
如果我移除阻力,Chrome 和 FF 就可以了。
问题在于它在 Chrome 上无法正常工作。火狐上还行。 一个想法?
谢谢
亚尼克
【问题讨论】:
标签: javascript google-chrome svg d3.js force-layout