graph zoom request bug fix [skip ci]

This commit is contained in:
overtake 2020-03-29 11:29:23 +04:00
parent 1979be1f85
commit 6e7e86175e
5 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@ public class BaseLinesChartController: BaseChartController {
} }
public override func didTapZoomIn(date: Date, pointIndex: Int) { public override func didTapZoomIn(date: Date, pointIndex: Int) {
guard isZoomed == false else { return } guard !isZoomed, isZoomable else { return }
setDetailsViewModel?(chartDetailsViewModel(closestDate: date, pointIndex: pointIndex, loading: true), false, false) setDetailsViewModel?(chartDetailsViewModel(closestDate: date, pointIndex: pointIndex, loading: true), false, false)

View File

@ -245,7 +245,7 @@ public class PercentPieChartController: BaseChartController {
} }
func didTapZoomIn(date: Date, animated: Bool) { func didTapZoomIn(date: Date, animated: Bool) {
guard isZoomed == false else { return } guard !isZoomed, isZoomable else { return }
cancelChartInteraction() cancelChartInteraction()
let currentCollection = percentController.chartsCollection let currentCollection = percentController.chartsCollection
let range: Int = Constants.zoomedRange let range: Int = Constants.zoomedRange

View File

@ -206,7 +206,7 @@ public class DailyBarsChartController: BaseChartController {
} }
public override func didTapZoomIn(date: Date, pointIndex: Int) { public override func didTapZoomIn(date: Date, pointIndex: Int) {
guard isZoomed == false else { return } guard !isZoomed, isZoomable else { return }
if isZoomed { if isZoomed {
return linesController.hideDetailsView(animated: true) return linesController.hideDetailsView(animated: true)
} }

View File

@ -221,7 +221,7 @@ public class StackedBarsChartController: BaseChartController {
} }
public override func didTapZoomIn(date: Date, pointIndex: Int) { public override func didTapZoomIn(date: Date, pointIndex: Int) {
guard isZoomed == false else { return } guard !isZoomed, isZoomable else { return }
if isZoomed { if isZoomed {
return zoomedBarsController.hideDetailsView(animated: true) return zoomedBarsController.hideDetailsView(animated: true)
} }

View File

@ -229,7 +229,7 @@ public class StepBarsChartController: BaseChartController {
} }
public override func didTapZoomIn(date: Date, pointIndex: Int) { public override func didTapZoomIn(date: Date, pointIndex: Int) {
guard isZoomed == false else { return } guard !isZoomed, isZoomable else { return }
if isZoomed { if isZoomed {
return zoomedBarsController.hideDetailsView(animated: true) return zoomedBarsController.hideDetailsView(animated: true)
} }