mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[ios] fix elevation chart failing on update
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
1bb2b2274f
commit
5b4d458579
@@ -51,7 +51,7 @@ class ChartLineView: UIView {
|
||||
}
|
||||
|
||||
func setViewport(minX: Int, maxX: Int, minY: CGFloat, maxY: CGFloat, animationStyle: ChartAnimation = .none) {
|
||||
assert(minX < maxX && minY < maxY)
|
||||
guard minX < maxX && minY < maxY else { return }
|
||||
self.minX = minX
|
||||
self.maxX = maxX
|
||||
self.minY = minY
|
||||
@@ -60,14 +60,14 @@ class ChartLineView: UIView {
|
||||
}
|
||||
|
||||
func setX(min: Int, max: Int) {
|
||||
assert(min < max)
|
||||
guard min < max else { return }
|
||||
minX = min
|
||||
maxX = max
|
||||
updateGraph()
|
||||
}
|
||||
|
||||
func setY(min: CGFloat, max: CGFloat, animationStyle: ChartAnimation = .none) {
|
||||
assert(min <= max)
|
||||
guard min < max else { return }
|
||||
minY = min
|
||||
maxY = max
|
||||
updateGraph(animationStyle: animationStyle)
|
||||
|
||||
@@ -227,7 +227,7 @@ class ChartPreviewView: ExpandedTouchView {
|
||||
}
|
||||
|
||||
func setX(min: Int, max: Int) {
|
||||
assert(min < max)
|
||||
guard min < max else { return }
|
||||
minX = min
|
||||
maxX = max
|
||||
updateViewPort()
|
||||
|
||||
Reference in New Issue
Block a user