Changeset 419


Ignore:
Timestamp:
Dec 22, 2006, 4:26:27 PM (13 years ago)
Author:
David Sheldon
Message:

Fix for the IE bug?

Location:
trunk/npemap.org.uk/static/tiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/map.html

    r398 r419  
    1717<script src="mapTiles.js" type="text/javascript"></script>
    1818<script type="text/javascript">
    19 window.onresize = doResize;
    20 
     19 YAHOO.util.Event.addListener(window,'resize',doResize);
    2120</script>
    2221
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r374 r419  
    4343
    4444
    45 var screenWidth = YAHOO.util.Dom.getViewportWidth();
    46 var screenHeight = YAHOO.util.Dom.getViewportHeight();
     45var screenWidth = 0;
     46var screenHeight = 0;
    4747var bottomLeft = new Array();
    4848
     
    224224
    225225function doResize() {
    226   screenWidth = YAHOO.util.Dom.getViewportWidth();
    227   screenHeight = YAHOO.util.Dom.getViewportHeight();
    228   drawTable();
    229   refreshGrid();
     226  var newWidth = YAHOO.util.Dom.getViewportWidth();
     227  var newHeight = YAHOO.util.Dom.getViewportHeight();
     228  if (screenHeight != newHeight || screenWidth != newWidth) {
     229    screenWidth = YAHOO.util.Dom.getViewportWidth();
     230                screenHeight = YAHOO.util.Dom.getViewportHeight();
     231                drawTable();
     232                refreshGrid();
     233        }
     234
    230235}
    231236
Note: See TracChangeset for help on using the changeset viewer.