Rapahel の円がいくつかあり、それらの上にカーソルを置いたときにテキストを表示する必要があります。これが私のコードです:
var text = R.text(X, Y, "some text");
R.circle(X, Y, 10).attr({"fill-opacity":0.8, fill:color, stroke: "white"})
.mouseover(function () {
this.animate({"fill-opacity": 1, 'transform':"s2 2"}, 500);}
txt.show();
})
.mouseout(function () {
this.animate({"fill-opacity": 0.8, 'transform':"s0.5 0.5"}, 500);}
txt.hide();
});
X と Y は、画面上にいくつかの円を描くループで計算されます。問題は、テキスト ショーが常に最後のものであり、位置も固定されていることです。このコードを機能させて、単一のテキストを各円にバインドするにはどうすればよいですか?