Browse Source

Skip mouseout event when chart is destroyed - #997

pull/1069/merge
Masayuki Tanaka 10 years ago
parent
commit
01aa08ac4a
  1. 2
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/interaction.js

2
c3.js

@ -2355,6 +2355,7 @@
})
.on('mouseout', function (d) {
var index = d.index;
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; }
$$.hideXGridFocus();
$$.hideTooltip();
@ -2466,6 +2467,7 @@
.attr('height', $$.height)
.attr('class', CLASS.eventRect)
.on('mouseout', function () {
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; }
mouseout();
})

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/interaction.js

@ -130,6 +130,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
})
.on('mouseout', function (d) {
var index = d.index;
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; }
$$.hideXGridFocus();
$$.hideTooltip();
@ -241,6 +242,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
.attr('height', $$.height)
.attr('class', CLASS.eventRect)
.on('mouseout', function () {
if (!$$.config) { return; } // chart is destroyed
if ($$.hasArcType()) { return; }
mouseout();
})

Loading…
Cancel
Save