Graphael pie.js unhover事件丢失

问题描述:

由于某些奇怪的原因,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); 
}; 

悬停事件发生两个功能 - f_in和F_OUT

左右(使用我的工作,现在的例子)

pie.hover(
    // hover function 
    function() { 
     this.sector.stop(); 
     this.sector.scale(1.1, 1.1, this.cx, this.cy); 
    }, 
    // un-hover function 
    function() { 
     this.sector.scale(0.9, 0.9, this.cx, this.cy); 
    } 
); 
+0

总得试试这个,明天,当我出局代码。会告诉你这件事的进展的。 –