From 254e4f946b3cadc2694759144366a6b21be14ba4 Mon Sep 17 00:00:00 2001 From: pah100 Date: Sun, 16 Apr 2017 00:53:19 +0800 Subject: [PATCH] Fix tooltip change detection --- src/component/tooltip/TooltipView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.js index 1e309532b..0a7cca3a7 100644 --- a/src/component/tooltip/TooltipView.js +++ b/src/component/tooltip/TooltipView.js @@ -613,13 +613,13 @@ define(function (require) { var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length; - each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { + contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) { var lastDataByAxis = lastItemCoordSys.dataByAxis || {}; var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {}; var thisDataByAxis = thisItemCoordSys.dataByAxis || []; contentNotChanged &= lastDataByAxis.length === thisDataByAxis.length; - each(lastDataByAxis, function (lastItem, indexAxis) { + contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) { var thisItem = thisDataByAxis[indexAxis] || {}; var lastIndices = lastItem.seriesDataIndices || []; var newIndices = thisItem.seriesDataIndices || []; @@ -630,7 +630,7 @@ define(function (require) { && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length; - each(lastIndices, function (lastIdxItem, j) { + contentNotChanged && each(lastIndices, function (lastIdxItem, j) { var newIdxItem = newIndices[j]; contentNotChanged &= lastIdxItem.seriesIndex === newIdxItem.seriesIndex -- GitLab