Raphael.js を使用して描画された要素を取得する方法を知りたいです。getById を試しましたが、まったく機能しません。
//ユーザーがサークルをクリックすると、サークル ID が取得され、サークルと同じ ID を持つが接頭辞が異なる //四角形を取得したい。
function addCircleClick(obj)
{
obj.click(function(event)
{
alert(paper+" getRect ID 1"+this.id);.
var getRect;
try
{
var getRect = paper.getById(this.id);////This below line(paper.getById(this.id)) is not working,even Circle object i am not able to get
}
catch(e)
{
alert(e);//Issue here
}
alert("getRect ID 2 "+getRect);
obj.attr({"stroke":"red"});
});
}