Fix mouse-wheel scrolling in the main app and the dashboard sun arc
Publish Container / publish (push) Successful in 2m55s
Publish Container / publish (push) Successful in 2m55s
- overscroll-behavior moved from <body> to <html>: with html+body both overflow-x:hidden, body is a scroll container and the rule blocked wheel scrolling from reaching the page - sunTimes returned the neighbouring day's sunrise/sunset (julian-day rounding), so midday looked like night; align results to the requested local day Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a9fc20cef4
commit
74198330d9
3 files changed
+7
-3
No files matched your search
@@ -106,7 +106,9 @@ function sunTimes(noonMs, lat, lon) {
|
||||
if (cosW > 1 || cosW < -1) return null; // polar day/night
|
||||
const w = Math.acos(cosW) / RAD;
|
||||
const toMs = (j) => (j - 2440587.5) * MS_DAY;
|
||||
return { rise: toMs(Jt - w / 360), set: toMs(Jt + w / 360), noon: toMs(Jt) };
|
||||
// The julian-day rounding above can land on the neighbouring day; align to the requested day
|
||||
const shift = Math.round((noonMs - toMs(Jt)) / MS_DAY) * MS_DAY;
|
||||
return { rise: toMs(Jt - w / 360) + shift, set: toMs(Jt + w / 360) + shift, noon: toMs(Jt) + shift };
|
||||
}
|
||||
const SYNODIC = 29.530588853;
|
||||
const NEW_MOON = Date.UTC(2000, 0, 6, 18, 14);
|
||||
|
||||
Reference in new issue
Block a user