Changeset 762 for trunk


Ignore:
Timestamp:
Oct 29, 2015, 3:38:46 PM (4 years ago)
Author:
Nick Burch
Message:

Avoid problems if the grid tries to refresh before the init has run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r756 r762  
    7575var bottomLeft = new Array();
    7676
    77 
     77var doneInit = false;
    7878var markerElement;
    7979var postcodeFormElement;
     
    307307    postcodeFormElement = $('postcode_form');
    308308    mainPageElement = $('main_page');
     309    doneInit = true;
    309310
    310311    if(tileVersion != null) {
     
    411412
    412413function refreshGrid() {
     414  if (!doneInit) {
     415    // Page is still loading, wait some more
     416    return;
     417  }
     418
    413419  closePostcodeWindow();
    414420  hideMarkerWindow();
Note: See TracChangeset for help on using the changeset viewer.