File: transitLegRow-Disable-go-to-animation-when-clicked.patch

package info (click to toggle)
gnome-maps 43.5-2~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,500 kB
  • sloc: javascript: 17,654; ansic: 1,804; xml: 69; makefile: 10
file content (41 lines) | stat: -rw-r--r-- 1,536 bytes parent folder | download
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();
         }