イベントクリック後に表示したいのでラファエルセットにidを設定したいです。
これは私のセットです:
var divResult = document.getElementById('printResult');
var space2Draw = Raphael(divResult, 1600, 900);
var st = space2Draw.set();
st.push(
space2Draw.circle(newXCoordinates, newYCoordinates, 20).click((function (valore) {
return function () {
window.open("index-point.html?id=" + (valore) + "&type=" + type + "&description=" + description + "&name=" + name);
}
}(valore))).mouseover(function () {
this.attr({ 'cursor': 'pointer' });
this.attr({ 'opacity': '.50' });
}).mouseout(function () {
this.attr({ 'opacity': '1' });
})
);
私のページにはボタンがあります:
function show(){
var element = space2Draw.getById(-1);
element.show();
}
}
この方法で ID を設定することはできません: set.id = -1? ID を設定して、そのセットを見つけるにはどうすればよいですか?
助けてくれてありがとう。