d3和mathjax,渲染输出消失

时间:2015-11-16 10:20:19

标签: javascript d3.js mathjax

示例代码在这里:http://codepen.io/Lett1/pen/EVrWRo?editors=011

我正在创建一个树形图并希望为每个节点添加简单的分数,我导入mathjax并附加这样的foreignObjects(忽略静态文本):

nodeEnter.append("foreignObject")
.attr("height",100)
.attr("width",100)
.text("$$ \\frac{2}{3} $$")

当codepen加载/刷新时,您可以看到渲染的公式弹出并在不久之后消失,为什么会发生?

0 个答案:

没有答案