Merge pull request #548 from JelteF/shown-hover-fix2

Fix error that occured when having hidden lines between shown lines
This commit is contained in:
Jelte Fennema 2015-01-17 19:22:01 +01:00
commit 9bc123a53a

View File

@ -339,11 +339,11 @@ class Morris.Line extends Morris.Grid
hilight: (index) =>
if @prevHilight isnt null and @prevHilight isnt index
for i in [0..@seriesPoints.length-1]
if @seriesPoints[i][@prevHilight]
if @hasToShow(i) and @seriesPoints[i][@prevHilight]
@seriesPoints[i][@prevHilight].animate @pointShrinkSeries(i)
if index isnt null and @prevHilight isnt index
for i in [0..@seriesPoints.length-1]
if @seriesPoints[i][index]
if @hasToShow(i) and @seriesPoints[i][index]
@seriesPoints[i][index].animate @pointGrowSeries(i)
@prevHilight = index