我基本上比拉斐尔的菜鸟还要糟糕。我想知道如何为以下代码设置路径 ID。我做了一些谷歌搜索,但找不到任何方法将 ID 设置为以下代码,因为它使用数组。
var mySVG=['exampleDOMid',400,400,
{
"type":"path","fill":"#C4C5C7","path":"path code here","stroke":"none"
},{
"type":"path","fill":"#EDEDEE","path":"path code here","stroke":"none"
},{
"type":"path","fill":"#5A5B5D","path":"path code here","stroke":"none"
},{
"type":"path","fill":"#231F20","path":"path code here","stroke":"none"
}];
var r = Raphael(mySVG);
我通过提交 SVG 文件从http://toki-woki.net/p/SVG2RaphaelJS/生成了代码