所以我尝试在 raphael js 中定义一个集合,但它一直在 raphael.js 文件中给我语法错误(第 3744 行)。我意识到这可能是我试图编写的函数中尚未关闭的括号,但对于我的生活,我似乎无法找到它。
var drawsymbol = function(paper, x, y, symboltype){
var st = paper.set(), newx = x+50;
if(symboltype==1){
st.push(
var circ = paper.cicle(x,y,50);//.attr({fill: "rgb(255,0,0)", stroke: "none", opacity: 1});
var conPoint1 = paper.circle(newx, y, 5);//.attr({fill: "rgb(255, 0,0)", stroke: "none", opacity: .5});
pathString = 'M'+newx+' '+y+ 'l10 0';
var path = paper.path(pathString);
);
}
return symbolset;
};