diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2023-04-08 22:13:40 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2023-04-08 22:16:44 +0200 |
commit | 379205d5ff64f4814a0ac9dc2812f1f9a9644a72 (patch) | |
tree | 387d7df07a0270195fe62513d5a32b72276d10da | |
parent | e962d98b8da8fb41af0c2f642acf93257533659e (diff) | |
download | gnome-maps-379205d5ff64f4814a0ac9dc2812f1f9a9644a72.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.js | 13 |
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(); } |