【发布时间】:2013-09-04 18:51:47
【问题描述】:
我需要做类似的事情:
paper.text(Left, Top, " " + this._p.Label + ":");
paper.text(Left, Top, " " + this._p.Label + ":");
但前置空格不会在文本中显示或显示为 。
我试过了:
label.attr({"xml:space": "preserve"});
...没有效果。
是否有办法访问 Raphael JS 中的 SVG 节点,以便我可以设置
setAttributeNS("http://www.w3.org/XML/1998/namespace","space","preserve");
(或者有没有其他方法可以解决这个问题?)
【问题讨论】:
标签: javascript raphael