Skip to content

Commit

Permalink
fixes Legend mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed May 23, 2017
1 parent cb3bcaf commit c50de1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,10 @@ export default class Legend extends BaseClass {
config[k] = {};
for (const t in baseConfig[k]) {
if ({}.hasOwnProperty.call(baseConfig[k], t)) {
config[k][t] = function(d) {
if (!baseConfig[k][t]) return;
baseConfig[k][t].bind(this)(d.data, d.i);
const f = baseConfig[k][t];
config[k][t] = function(dd) {
if (!f) return;
f.bind(this)(dd.data, dd.i);
};
}
}
Expand Down

0 comments on commit c50de1c

Please sign in to comment.