0
由於某些奇怪的原因,Graphael沒有非停歇事件。發現在本pie.js塊的代碼創建懸停事件:Graphael pie.js unhover事件丟失
chart.hover = function (fin, fout) {
fout = fout || function() {};
var that = this;
for (var i = 0; i < len; i++) {
(function (sector, cover, j) {
var o = {
sector: sector,
cover: cover,
cx: cx,
cy: cy,
mx: sector.middle.x,
my: sector.middle.y,
mangle: sector.mangle,
r: r,
value: values[j],
total: total,
label: that.labels && that.labels[j]
};
cover.mouseover(function() {
fin.call(o);
}).mouseout(function() {
fout.call(o);
});
})(series[i], covers[i], i);
}
return this;
};
的unhover事件是拉斐爾JS在下面的代碼片段。使用這兩種方法必須有一種方法可以爲Grapael餅圖創建非停留。任何幫助在這裏將非常非常感激,因爲我很難過!
elproto.unhover = function (f_in, f_out) {
return this.unmouseover(f_in).unmouseout(f_out);
};
總得試試這個,明天,當我出局代碼。會告訴你這件事的進展的。 –