From c50de1c6daa87a71d9754fbb610826ea64cb552e Mon Sep 17 00:00:00 2001 From: Dave Landry Date: Tue, 23 May 2017 16:51:48 -0400 Subject: [PATCH] fixes Legend mouse events --- src/Legend.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Legend.js b/src/Legend.js index 9194972..69e4eed 100644 --- a/src/Legend.js +++ b/src/Legend.js @@ -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); }; } }