From 30318b3a3283c5d9d13be6f4faaac737dc050164 Mon Sep 17 00:00:00 2001 From: Marcus Lundblad Date: Sat, 8 Apr 2023 22:11:56 +0200 Subject: 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 --- src/transitArrivalRow.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.1