Fix horizontal scroll going too far to the left (#4213)

Previously one could scroll infinitely to the left. This clams it to 0.

Release Notes:

- Fixed horizontal scroll possibly going too far to the left.
This commit is contained in:
Antonio Scandurra 2024-01-23 13:38:35 +01:00 committed by GitHub
commit a802bb284c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -202,7 +202,7 @@ impl ScrollManager {
ScrollAnchor {
anchor: top_anchor,
offset: point(
scroll_position.x,
scroll_position.x.max(0.),
scroll_position.y - top_anchor.to_display_point(&map).row() as f32,
),
},