Hier finden Sie eine Grafik mit bearbeitbaren Etiketten (mit SVG Foreinobject).Machen Sie zufriedene Etiketten in einem d3js Force-Layout mit ForeignObject und ziehen Sie auf Chrome
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());
});
Wenn ich die Widerstandskraft zu entfernen, ist es auf Chrome & FF ok.
Das Problem ist, dass es in Chrome nicht funktioniert. OK auf Firefox. Eine Idee?
Dank
Yannick