Changeset 263


Ignore:
Timestamp:
Nov 1, 2006, 1:21:19 PM (13 years ago)
Author:
David Sheldon
Message:

Remove annoying firstTime hack that didn't work, and solve the problem
by calibrating later.

File:
1 edited

Legend:

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

    r262 r263  
    1919var zoomLevel = 1;
    2020
    21 var firstTime = 1;
     21var needCalibration = true;
    2222
    2323var prefixes = new Array(1);
     
    214214function drawTable() {
    215215  sizeGridX = Math.floor(((screenWidth -210) / tileWidth));
    216   sizeGridY = Math.floor(((screenHeight -150) / tileHeight));
     216  sizeGridY = Math.floor(((screenHeight -130) / tileHeight));
    217217 
    218218  page = '';
     
    307307
    308308  if (zoomLevel == 1) {
    309                 if ((firstTime == 1)&& document.all) {
    310                         setTimeout(drawExisting, 1000);
    311                 }       else { drawExisting();}
    312         }
    313   firstTime = 0;
     309                drawExisting();
     310        }
    314311        updatePermalink();
    315312}
     
    332329                spinnerElement.className = 'loading';
    333330                spinnerElement.innerHTML = 'Loading...';
    334                 findMarkerOffsets();
     331                needCalibration = true;
    335332               
    336333                YAHOO.util.Connect.asyncRequest('GET', url, callback); 
     
    352349  markerTop= parseInt(newMarker.style.top);
    353350  mainPageElement.removeChild(newMarker);
     351        needCalibration = false;
    354352}
    355353
     
    391389  var id = others[0];
    392390  var source = others[1];
     391
     392  if (needCalibration) findMarkerOffsets();
    393393
    394394  if (nextMarker < markers.length) {
Note: See TracChangeset for help on using the changeset viewer.