1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From: Marcus Lundblad <ml@dfupdate.se>
Date: Sat, 8 Apr 2023 22:13:40 +0200
Subject: 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.
Bug: https://gitlab.gnome.org/GNOME/gnome-maps/-/issues/546
Origin: upstream
Applied-upstream: 44.1, commit:e962d98b8da8fb41af0c2f642acf93257533659e
---
src/transitLegRow.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/transitLegRow.js b/src/transitLegRow.js
index b1e06db..11e6813 100644
--- a/src/transitLegRow.js
+++ b/src/transitLegRow.js
@@ -130,9 +130,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();
}
|