diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2023-04-08 22:11:56 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2023-04-08 22:15:16 +0200 |
commit | 30318b3a3283c5d9d13be6f4faaac737dc050164 (patch) | |
tree | fe702f890f1fbd2dcd244e005976618fa84a5525 | |
parent | 74797c8baba445ed0340e6c161a37e7f614a6fe2 (diff) | |
download | gnome-maps-30318b3a3283c5d9d13be6f4faaac737dc050164.tar.gz |
transitArrivalRow: Disable go-to animation when clicked
To avoid getting throttled by the tile server, like
in other places for now disable the go-to animation.
Ref #546
-rw-r--r-- | src/transitArrivalRow.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transitArrivalRow.js b/src/transitArrivalRow.js index 7818199b..a9d78bf3 100644 --- a/src/transitArrivalRow.js +++ b/src/transitArrivalRow.js @@ -42,7 +42,17 @@ export class TransitArrivalRow extends Gtk.ListBoxRow { } _onPress(coord) { - this._mapView.map.go_to_full(coord[0], coord[1], 16); + /* + * WORKAROUND!!!! + * + * For now disable the animation to prevent getting + * throttled by the tile server: + * https://gitlab.gnome.org/GNOME/gnome-maps/-/issues/546 + */ + this._mapView.map.center_on(coord[0], coord[1]); + this._mapView.map.viewport.zoom_level = 16; + + //this._mapView.map.go_to_full(coord[0], coord[1], 16); } } |