gpstrek - Fix flag having the color of the waypoint dot

pull/2255/head
Martin Boonk 2022-11-05 21:45:51 +01:00
parent 8f2fcf38ca
commit 52dab3f31e
1 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,7 @@ let getCompassSlice = function(compassDataSource){
if (compassDataSource.getPoints){ if (compassDataSource.getPoints){
for (let p of compassDataSource.getPoints()){ for (let p of compassDataSource.getPoints()){
g.reset();
var bpos = p.bearing - lastDrawnValue; var bpos = p.bearing - lastDrawnValue;
if (bpos>180) bpos -=360; if (bpos>180) bpos -=360;
if (bpos<-180) bpos +=360; if (bpos<-180) bpos +=360;
@ -288,6 +289,7 @@ let getCompassSlice = function(compassDataSource){
} }
if (compassDataSource.getMarkers){ if (compassDataSource.getMarkers){
for (let m of compassDataSource.getMarkers()){ for (let m of compassDataSource.getMarkers()){
g.reset();
g.setColor(m.fillcolor); g.setColor(m.fillcolor);
let mpos = m.xpos * width; let mpos = m.xpos * width;
if (m.xpos < 0.05) mpos = Math.floor(width*0.05); if (m.xpos < 0.05) mpos = Math.floor(width*0.05);