Compare commits

...

9 Commits
v6.5.5 ... main

Author SHA1 Message Date
Matt Walsh
c07ebe8bdd 6.5.9 2026-04-09 12:19:03 -05:00
Matt Walsh
a41b0da196 more generalized fix for mapclick enhanced timestamps close #203
moves changes made in 0b47cf79c1 to the mapclick processing for benefit of other mapclick calls
2026-04-09 12:18:56 -05:00
Matt Walsh
30887202c8 6.5.8 2026-04-09 11:30:35 -05:00
Matt Walsh
38d1455a4b fix custom text scroll 2026-04-09 11:29:49 -05:00
Matt Walsh
30ec847ed5 Hide cursor in kiosk
via @iapetusz
2026-04-09 11:22:36 -05:00
Matt Walsh
11c54391b2 6.5.7 2026-04-08 22:42:07 -05:00
Matt Walsh
0b47cf79c1 don't overwrite timestamps when enhancing with mapclick 2026-04-08 22:41:42 -05:00
Matt Walsh
ba36904477 6.5.6 2026-04-08 11:39:36 -05:00
Matt Walsh
dae5b20bc6 fix radar round/floor mismatch in calculations close #200 2026-04-08 11:39:25 -05:00
9 changed files with 20 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2025 Matt Walsh
Copyright (c) 2020-2026 Matt Walsh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ws4kp",
"version": "6.5.5",
"version": "6.5.9",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ws4kp",
"version": "6.5.5",
"version": "6.5.9",
"license": "MIT",
"dependencies": {
"dotenv": "^17.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "ws4kp",
"version": "6.5.5",
"version": "6.5.9",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.mjs",
"type": "module",

View File

@@ -72,7 +72,7 @@ const init = async () => {
if (!navigator.geolocation) btnGetGps.style.display = 'none';
document.querySelector('#divTwc').addEventListener('mousemove', () => {
if (document.fullscreenElement) updateFullScreenNavigate();
if (document.fullscreenElement || settings.kiosk?.value) updateFullScreenNavigate();
});
document.querySelector('#btnGetLatLng').addEventListener('click', () => autoComplete.directFormSubmit());
@@ -384,7 +384,7 @@ const updateFullScreenNavigate = () => {
}
navigateFadeIntervalId = setTimeout(() => {
if (document.fullscreenElement) {
if (document.fullscreenElement || settings.kiosk?.value) {
divTwcBottom.classList.remove('visible');
divTwcBottom.classList.add('hidden');
document.querySelector('#divTwc').classList.add('no-cursor');

View File

@@ -101,7 +101,10 @@ class CurrentWeather extends WeatherDisplay {
debugContext: 'currentweather',
});
// copy enhanced data and restore the timestamp if it was overwritten by older data from mapclick
candidateObservation.features[0].properties = enhancedResult.data;
const { missingFields } = enhancedResult;
const missingRequired = missingFields.filter((fieldName) => {
const field = requiredFields.find((f) => f.name === fieldName && f.required);

View File

@@ -17,7 +17,7 @@ const changeEnable = (newValue) => {
// hide the string entry
newDisplay = 'none';
}
const stringEntry = document.getElementById('settings-customText-label');
const stringEntry = document.getElementById('settings-customText-string');
if (stringEntry) {
stringEntry.style.display = newDisplay;
}

View File

@@ -9,10 +9,12 @@ const pixelToFile = (xPixel, yPixel) => {
return `${yTile}-${xTile}`;
};
// convert a pixel location in the overall map to a pixel location on the tile
// convert a pixel location in the overall map to a pixel location on the tile set
const modTile = (xPixel, yPixel) => {
const x = Math.round(xPixel) % TILE_SIZE.x;
const y = Math.round(yPixel) % TILE_SIZE.y;
// adjust for additional 1 tile when odd
const x = (Math.floor(xPixel) % (TILE_SIZE.x));
const y = (Math.floor(yPixel) % (TILE_SIZE.y));
return { x, y };
};
@@ -46,8 +48,8 @@ const setTiles = (data) => {
// determine which tiles are used
const usedTiles = [
true,
TILE_SIZE.x - tileShift.x < RADAR_FINAL_SIZE.width,
TILE_SIZE.y - tileShift.y < RADAR_FINAL_SIZE.width,
tileShift.x + TILE_SIZE.x > RADAR_FINAL_SIZE.width,
tileShift.y + TILE_SIZE.y > RADAR_FINAL_SIZE.height,
];
// if we need t[1] and t[2] then we also need t[3]
usedTiles.push(usedTiles[1] && usedTiles[2]);

View File

@@ -44,9 +44,11 @@ const kioskChange = (value) => {
if (value) {
body.classList.add('kiosk');
document.querySelector('#divTwc')?.classList.add('no-cursor');
window.dispatchEvent(new Event('resize'));
} else {
body.classList.remove('kiosk');
document.querySelector('#divTwc')?.classList.remove('no-cursor');
window.dispatchEvent(new Event('resize'));
}

View File

@@ -650,7 +650,7 @@ export const enhanceObservationWithMapClick = async (observationData, options =
}
return {
data: mapClickProps,
data: { ...mapClickProps, timestamp: observationData.timestamp },
wasImproved: true,
improvements,
missingFields: [...mapClickMissingRequired, ...mapClickMissingOptional],