WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: Jasiu on December 04, 2018, 09:33:27 AM

Title: Fix for Resizing NOAA/NWS US Advisory Maps - wxusalerts-varsize
Post by: Jasiu on December 04, 2018, 09:33:27 AM
Found a bug yesterday in my code that Jerry used to make the US alerts map resizable.

Bug: Because the container div for the Alaska and Hawaii maps has a width of 100% and a z-index of 1, the area where that overlaps the continental US map isn't clickable (even though it is visible). My apologies to the fine folks of southern Texas and Florida as well as the sea interests in the Gulf of Mexico!

Fix (hopefully):

Code: [Select]
#alaskaHawaiiAlertsMaps
{
   position: absolute;
   width: 100%;  // < make this 36%
   bottom: 0px;
   z-index: 1;
}

#alaskaAlerts,
#hawaiiAlerts
{
   display: block;
   float: left;
   margin: 0;
   padding: 0;
   width: 18%; // < make this 49%
   border: 1px solid #cccccc;
}

That clears the overlap area and allows for clicks again.

I've only tested this on Mac OS with Firefox, Safari, and Chrome.
Title: Re: Fix for Resizing NOAA/NWS US Advisory Maps - wxusalerts-varsize
Post by: gwwilk on December 04, 2018, 10:54:25 AM
Thanks, Jasiu!  Good catch and fix! =D&gt;

Script updated on my scripts page (https://www.gwwilkins.org/gwwScripts.php).