Merge lp:~joergberroth/unav/move_zoomSpash_slightly_upwards into lp:unav

Proposed by JkB
Status: Superseded
Proposed branch: lp:~joergberroth/unav/move_zoomSpash_slightly_upwards
Merge into: lp:unav
Diff against target: 109 lines (+11/-24)
4 files modified
nav/class/UI.js (+1/-14)
nav/class/WebAPI.js (+3/-3)
nav/index.html (+6/-6)
qml/Main.qml (+1/-1)
To merge this branch: bzr merge lp:~joergberroth/unav/move_zoomSpash_slightly_upwards
Reviewer Review Type Date Requested Status
uNav developers Pending
Review via email: mp+290905@code.launchpad.net

This proposal has been superseded by a proposal from 2016-04-04.

Commit message

move_zoomSpash_slightly_upwards to avoid to collide with navigation panel in landscape

Description of the change

move_zoomSpash_slightly_upwards to avoid to collide with navigation panel in landscape

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nav/class/UI.js'
2--- nav/class/UI.js 2016-04-01 15:41:41 +0000
3+++ nav/class/UI.js 2016-04-04 18:25:09 +0000
4@@ -362,20 +362,7 @@
5
6 switch(this.nav.get_route_status()) {
7 case 'waiting4signal':
8- var gps_data = this.nav.get_pos_data();
9- if (gps_data['accu'] <= this.nav.ACCU4DRIVE) {
10- $('#p_msg').html("<progress value='100' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
11- } else if (gps_data['accu'] <= this.nav.ACCU4DRIVE * 2) {
12- $('#p_msg').html("<progress value='80' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
13- } else if (gps_data['accu'] <= this.nav.ACCU4DRIVE * 4) {
14- $('#p_msg').html("<progress value='60' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
15- } else if (gps_data['accu'] <= this.nav.ACCU4DRIVE * 7) {
16- $('#p_msg').html("<progress value='40' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
17- } else if (gps_data['accu'] <= this.nav.ACCU4DRIVE * 10) {
18- $('#p_msg').html("<progress value='20' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
19- } else {
20- $('#p_msg').html("<progress value='5' max='100' id='gps_progress'></progress><br>" + t("Waiting for a GPS signal…"));
21- }
22+ $('#p_msg').html(t("Waiting for a GPS signal…"));
23 $('#panel_msg').show();
24 break;
25 case 'calc':
26
27=== modified file 'nav/class/WebAPI.js'
28--- nav/class/WebAPI.js 2016-04-01 14:48:39 +0000
29+++ nav/class/WebAPI.js 2016-04-04 18:25:09 +0000
30@@ -58,7 +58,7 @@
31 api_key: 'valhalla-4DcFzeQ' // TODO debug
32 },
33 dataType: 'json',
34- timeout: 90000,
35+ timeout: 30000,
36 success: this.OK_callback_set_route.bind(this),
37 error: this.KO_callback_set_route.bind()
38 });
39@@ -120,7 +120,7 @@
40 api_key: 'valhalla-4DcFzeQ' // TODO debug
41 },
42 dataType: 'json',
43- timeout: 90000,
44+ timeout: 30000,
45 success: this.OK_callback_simulate.bind(this),
46 error: this.KO_callback_simulate.bind()
47 });
48@@ -181,7 +181,7 @@
49 // Search radars POI http://wiki.openstreetmap.org/wiki/Overpass_API
50 $.ajax({
51 url: 'https://www.overpass-api.de/api/xapi?node[highway=speed_camera]' + bbox,
52- timeout: 90000,
53+ timeout: 30000,
54 dataType: 'xml',
55 success: this.OK_callback_set_radars.bind(this),
56 error: this.KO_callback_set_radars.bind()
57
58=== modified file 'nav/index.html'
59--- nav/index.html 2016-04-01 16:13:33 +0000
60+++ nav/index.html 2016-04-04 18:25:09 +0000
61@@ -259,13 +259,14 @@
62 var id_gps = 0;
63 var id_auto_accept = 0;
64 var id_gps_died = 0;
65+ var show_gps_denied = true;
66 var times_without_accuracy = -1; // Control 1st time
67
68 function center_pos() {
69 ui.set_center_1st_pos(true);
70 ui.set_map_stretched(true);
71 if (id_gps == 0) {
72- id_gps_died = setTimeout('$("#gps_died").show();', 350000);
73+ id_gps_died = setTimeout('$("#gps_died").show();', 300000); // 5 sec
74 var t_prev_run = $.now() - 1;
75 gps_start(t_prev_run); // GPS will run forever
76 }
77@@ -395,15 +396,14 @@
78 }
79 },
80 function (error) {
81- if (error.code == 1) {
82- navigator.geolocation.clearWatch(id_gps);
83- id_gps = 0;
84+ if (error.code == 1 && show_gps_denied) {
85+ show_gps_denied = false;
86 $('#gps_denied').show();
87- click_cancel_route();
88 }
89 },
90 {
91- enableHighAccuracy: true
92+ enableHighAccuracy: true,
93+ maximumAge: 0
94 }
95 );
96 }
97
98=== modified file 'qml/Main.qml'
99--- qml/Main.qml 2016-04-04 17:30:04 +0000
100+++ qml/Main.qml 2016-04-04 18:25:09 +0000
101@@ -411,7 +411,7 @@
102 right: parent.right
103 rightMargin: units.gu(1)
104 verticalCenter: parent.verticalCenter
105- verticalCenterOffset: units.gu(2)
106+ verticalCenterOffset: units.gu(-3)
107 }
108
109 visible: navigationPage.buttonsEnabled

Subscribers

People subscribed via source and target branches