Changeset 119


Ignore:
Timestamp:
Oct 21, 2006, 11:18:17 PM (13 years ago)
Author:
David Sheldon
Message:

remove zoom in button on zoomlevel 1

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

Legend:

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

    r111 r119  
    3838                        <a href="javascript:zoomOut()">zoom out</a>
    3939                        <br />
    40                         <a href="javascript:zoomIn()">zoom in</a>
     40      <span id="zoomin_enabled"><a href="javascript:zoomIn()" >zoom in</a></span>
     41      <span id="zoomin_disabled" style="display: none">zoom in</span>
    4142                </div>
    4243
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r117 r119  
    6161
    6262  YAHOO.util.Event.addListener('postcode1', 'keypress', box1Keypress );
     63  fixZoomButton();
    6364 
    6465
     
    128129        zoomLevel = zoomLevel + 1;
    129130    prefix = prefixes[zoomLevel];
     131  fixZoomButton();
    130132
    131133        refreshGrid();
     
    142144        zoomLevel = zoomLevel - 1;
    143145    prefix = prefixes[zoomLevel];
    144 
     146       
     147  fixZoomButton();
    145148        refreshGrid();
    146149}
    147150
    148 
     151function fixZoomButton() {
     152  if(zoomLevel == 1) {
     153    document.getElementById('zoomin_enabled').style.visibility = 'hidden';
     154    document.getElementById('zoomin_disabled').style.visibility = 'visible';
     155        } else {
     156    document.getElementById('zoomin_enabled').style.visibility = 'visible';
     157    document.getElementById('zoomin_disabled').style.visibility = 'hidden';
     158  }
     159}
    149160var screenWidth = YAHOO.util.Dom.getViewportWidth();
    150161var screenHeight = YAHOO.util.Dom.getViewportHeight();
Note: See TracChangeset for help on using the changeset viewer.