Commit 01aa08ac authored by Masayuki Tanaka's avatar Masayuki Tanaka

Skip mouseout event when chart is destroyed - #997

parent e3c291fc
...@@ -2355,6 +2355,7 @@ ...@@ -2355,6 +2355,7 @@
}) })
.on('mouseout', function (d) { .on('mouseout', function (d) {
var index = d.index; var index = d.index;
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; } if ($$.hasArcType()) { return; }
$$.hideXGridFocus(); $$.hideXGridFocus();
$$.hideTooltip(); $$.hideTooltip();
...@@ -2466,6 +2467,7 @@ ...@@ -2466,6 +2467,7 @@
.attr('height', $$.height) .attr('height', $$.height)
.attr('class', CLASS.eventRect) .attr('class', CLASS.eventRect)
.on('mouseout', function () { .on('mouseout', function () {
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; } if ($$.hasArcType()) { return; }
mouseout(); mouseout();
}) })
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -130,6 +130,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) { ...@@ -130,6 +130,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
}) })
.on('mouseout', function (d) { .on('mouseout', function (d) {
var index = d.index; var index = d.index;
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; } if ($$.hasArcType()) { return; }
$$.hideXGridFocus(); $$.hideXGridFocus();
$$.hideTooltip(); $$.hideTooltip();
...@@ -241,6 +242,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) ...@@ -241,6 +242,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
.attr('height', $$.height) .attr('height', $$.height)
.attr('class', CLASS.eventRect) .attr('class', CLASS.eventRect)
.on('mouseout', function () { .on('mouseout', function () {
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; } if ($$.hasArcType()) { return; }
mouseout(); mouseout();
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment