summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2023-04-08 22:13:40 +0200
committerMarcus Lundblad <ml@dfupdate.se>2023-04-08 22:15:33 +0200
commit8789b961812e5bdba4caf69571e765500ef78fdc (patch)
treefa10bbc9f847a36f3f5cd08d8a79df6904eddee0
parent30318b3a3283c5d9d13be6f4faaac737dc050164 (diff)
downloadgnome-maps-8789b961812e5bdba4caf69571e765500ef78fdc.tar.gz
transitLegRow: 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/transitLegRow.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/transitLegRow.js b/src/transitLegRow.js
index d1a16a43..1d89d72e 100644
--- a/src/transitLegRow.js
+++ b/src/transitLegRow.js
@@ -121,9 +121,22 @@ export class TransitLegRow extends Gtk.ListBoxRow {
if (this._isExpanded) {
this._collaps();
} else {
+ /*
+ * 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(this._leg.fromCoordinate[0],
+ this._leg.fromCoordinate[1]);
+ this._mapView.map.viewport.zoom_level = 16;
+
+ /*
this._mapView.map.go_to_full(this._leg.fromCoordinate[0],
this._leg.fromCoordinate[1],
16);
+ */
if (this._hasIntructions())
this._expand();
}