Changeset 541
- Timestamp:
- Apr 30, 2007, 2:34:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/london.npemap.org.uk/index.html
r539 r541 23 23 </div> 24 24 25 <div class="mid-col" >25 <div class="mid-col" id="map-col"> 26 26 <noscript> 27 27 This site requires javascript … … 31 31 <img src="/thumbnail.jpg" alt="Map of London" id="link" /> 32 32 <br /> 33 <i>These maps are reproduced by kind permission of the Geographers' A-Z Map 34 Company, and are still in <a href="/FAQ.html#licence">copyright</a>.</i> 33 <i>These maps are reproduced by kind permission of 34 the Geographers' A-Z Map Company, and are still in 35 <a href="/FAQ.html#licence">copyright</a>.</i> 35 36 </div> 36 37 </div> … … 56 57 // Attach an onclick action to the thumbnail image 57 58 YAHOO.util.Event.addListener("link", "click", click); 59 60 // Attach a resize helper 61 YAHOO.util.Event.addListener(window,'resize',doResize); 62 63 screenWidth = -1; 64 screenHeight = -1; 65 function doResize() { 66 var newWidth = YAHOO.util.Dom.getViewportWidth(); 67 var newHeight = YAHOO.util.Dom.getViewportHeight(); 68 if (screenHeight != newHeight || screenWidth != newWidth) { 69 screenWidth = YAHOO.util.Dom.getViewportWidth(); 70 screenHeight = YAHOO.util.Dom.getViewportHeight(); 71 72 // Tweak the map size if required 73 var img_width = 624; 74 var img = $('link'); 75 var text = $('map-col'); 76 if(screenWidth >= 1175) { 77 img.style.width = img_width + "px"; 78 text.style.width = '55%'; 79 } else if(screenWidth >= 1000) { 80 img.style.width = (screenWidth - 530) + "px"; 81 text.style.width = (screenWidth - 520) + "px"; 82 } else if(screenWidth >= 700) { 83 img.style.width = (screenWidth - 500) + "px"; 84 text.style.width = (screenWidth - 490) + "px"; 85 } else { 86 img.style.width = (screenWidth - 370) + "px"; 87 text.style.width = (screenWidth - 360) + "px"; 88 } 89 } 90 } 91 doResize(); 58 92 </script> 59 93
Note: See TracChangeset
for help on using the changeset viewer.