Bugfixes
This commit is contained in:
@@ -717,27 +717,6 @@ function drawArc(){
|
||||
ctx.clip();
|
||||
|
||||
if(!sd.polarNight){
|
||||
// Unter-Horizont gestrichelt (normal day) - nur Punkte wo alt<0
|
||||
if(!sd.polarDay){
|
||||
const sub=[];
|
||||
for(let i=0;i<=80;i++){
|
||||
const h=sd.riseUTC-3+i*6/80;
|
||||
const{altitude,azimuth}=sunAltAz(loc.lat,loc.lon,hourToDate(currentDate,h));
|
||||
if(altitude<0) sub.push(proj(altitude,azimuth));
|
||||
else if(sub.length>0) { sub.push(null); } // Unterbrecher
|
||||
}
|
||||
// Zeichne mit Unterbrechungen
|
||||
ctx.beginPath();
|
||||
let inPath=false;
|
||||
sub.forEach(p=>{
|
||||
if(!p){inPath=false;return;}
|
||||
if(!inPath){ctx.moveTo(p.x,p.y);inPath=true;}
|
||||
else ctx.lineTo(p.x,p.y);
|
||||
});
|
||||
ctx.strokeStyle='rgba(200,168,75,.15)';ctx.lineWidth=1.5*dpr;
|
||||
ctx.setLineDash([4*dpr,8*dpr]);ctx.stroke();ctx.setLineDash([]);
|
||||
}
|
||||
|
||||
// Äußerer Gluehschein
|
||||
ctx.beginPath();
|
||||
drawWrappedPath(ctx,pts,W,sd.polarDay);
|
||||
|
||||
Reference in New Issue
Block a user