Chart fixes

This commit is contained in:
Ilya Laktyushin
2020-03-25 23:15:05 +04:00
parent 4abab11e7e
commit eb4105cc36
12 changed files with 31 additions and 30 deletions

View File

@@ -129,7 +129,7 @@ class GeneralChartComponentController: ChartThemeContainer {
func updateChartsVisibility(visibility: [Bool], animated: Bool) {
self.chartVisibility = visibility
if isChartInteractionBegun {
chartInteractionDidBegin(point: lastChartInteractionPoint)
chartInteractionDidBegin(point: lastChartInteractionPoint, manual: false)
}
}
@@ -169,11 +169,11 @@ class GeneralChartComponentController: ChartThemeContainer {
return (closestDate, minIndex)
}
func chartInteractionDidBegin(point: CGPoint) {
func chartInteractionDidBegin(point: CGPoint, manual: Bool = true) {
guard !ignoreInteraction else {
return
}
if !isChartInteractionBegun && detailsVisible {
if manual && !isChartInteracting && detailsVisible {
self.hideDetailsView(animated: true)
ignoreInteraction = true
return
@@ -203,7 +203,6 @@ class GeneralChartComponentController: ChartThemeContainer {
}
func chartInteractionDidEnd() {
isChartInteractionBegun = false
isChartInteracting = false
ignoreInteraction = false
}