Fix error that occured when having hidden lines between shown lines

This commit is contained in:
Jelte Fennema 2015-01-16 18:11:17 +01:00
parent a7e1cdd142
commit 93342c5a73

View File

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