gpstrek - Workaround minifier issue

master
Martin Boonk 2022-12-04 21:13:10 +01:00
parent 11e5dc5905
commit 2df4ba30f5
3 changed files with 6 additions and 3 deletions

View File

@ -13,3 +13,4 @@
Reconstruct battery voltage by using calibrated batFullVoltage Reconstruct battery voltage by using calibrated batFullVoltage
Averaging for smoothing compass headings Averaging for smoothing compass headings
Save state if route or waypoint has been chosen Save state if route or waypoint has been chosen
0.09: Workaround a minifier issue allowing to install gpstrek with minification enabled

View File

@ -259,7 +259,8 @@ let getCompassSlice = function(compassDataSource){
if (compassDataSource.getPoints){ if (compassDataSource.getPoints){
for (let p of compassDataSource.getPoints()){ let points = compassDataSource.getPoints(); //storing this in a variable works around a minifier bug causing a problem in the next line: for(let a of a.getPoints())
for (let p of points){
g.reset(); g.reset();
var bpos = p.bearing - lastDrawnValue; var bpos = p.bearing - lastDrawnValue;
if (bpos>180) bpos -=360; if (bpos>180) bpos -=360;
@ -285,7 +286,8 @@ let getCompassSlice = function(compassDataSource){
} }
} }
if (compassDataSource.getMarkers){ if (compassDataSource.getMarkers){
for (let m of compassDataSource.getMarkers()){ let markers = compassDataSource.getMarkers(); //storing this in a variable works around a minifier bug causing a problem in the next line: for(let a of a.getMarkers())
for (let m of markers){
g.reset(); g.reset();
g.setColor(m.fillcolor); g.setColor(m.fillcolor);
let mpos = m.xpos * width; let mpos = m.xpos * width;

View File

@ -1,7 +1,7 @@
{ {
"id": "gpstrek", "id": "gpstrek",
"name": "GPS Trekking", "name": "GPS Trekking",
"version": "0.08", "version": "0.09",
"description": "Helper for tracking the status/progress during hiking. Do NOT depend on this for navigation!", "description": "Helper for tracking the status/progress during hiking. Do NOT depend on this for navigation!",
"icon": "icon.png", "icon": "icon.png",
"screenshots": [{"url":"screen1.png"},{"url":"screen2.png"},{"url":"screen3.png"},{"url":"screen4.png"}], "screenshots": [{"url":"screen1.png"},{"url":"screen2.png"},{"url":"screen3.png"},{"url":"screen4.png"}],