Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix programatical unhighlighting for BarCharView #3159

Merged
merged 1 commit into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,13 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD

if h === nil || h == self.lastHighlighted
{
highlightValue(nil, callDelegate: true)
lastHighlighted = nil
highlightValue(nil, callDelegate: true)
}
else
{
highlightValue(h, callDelegate: true)
lastHighlighted = h
highlightValue(h, callDelegate: true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we change the order here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
}
Expand Down
1 change: 1 addition & 0 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate

if h == nil
{
self.lastHighlighted = nil
_indicesToHighlight.removeAll(keepingCapacity: false)
}
else
Expand Down