File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,24 +264,17 @@ export default function MapComponent() {
264264
265265 // Add click handler FIRST (this is the main functionality)
266266 marker . on ( 'click' , async ( ) => {
267- console . log ( 'Marker clicked:' , name ) ; // Debug log
268-
269- // Announce to screen readers
270- try {
271- announceToScreenReader ( `Viewing details for ${ name } with water temperature ${ formattedTemp } ` ) ;
272- } catch ( e ) {
273- console . log ( 'Screen reader announcement failed:' , e ) ;
274- }
267+ // add prefix for grey (stale) points
268+ const labelPrefix = isStale ? '<strong>OLD:</strong> ' : '' ;
275269
276270 const historicalData = await fetchHistoricalData ( name ) ;
271+ const popupOffset = [ 17 , - 32 ] ;
277272
278- // add once at top of click‐handler so you can reuse
279- const popupOffset = [ 17 , - 32 ] ; // x=0 (center), y=−45px (above marker)
280-
273+ // no historical data
281274 if ( historicalData . length === 0 ) {
282275 marker . bindPopup ( `
283276 <div role="dialog" aria-labelledby="popup-title-${ i } ">
284- <h3 id="popup-title-${ i } ">${ name } </h3>
277+ <h3 id="popup-title-${ i } ">${ labelPrefix } ${ name } </h3>
285278 <p>No historical data available</p>
286279 <p>Current temperature: ${ formattedTemp } (${ tempCategory } )</p>
287280 </div>
You can’t perform that action at this time.
0 commit comments