Team:ETH Zurich/lab/overview/overview map
From 2014.igem.org
(Difference between revisions)
(Created page with "<html> <center> <img usemap="#map" id="map" src="https://static.igem.org/mediawiki/2014/c/ce/ETH_Zurich_2014_Lab_overview_new.png" style="width:100%;"/> <map id="map" name="map"><area...") |
|||
(3 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | (function($) { | ||
+ | function img(url) { | ||
+ | var i = new Image; | ||
+ | i.src = url; | ||
+ | return i; | ||
+ | } | ||
+ | |||
+ | if ('naturalWidth' in (new Image)) { | ||
+ | $.fn.naturalWidth = function() { return this[0].naturalWidth; }; | ||
+ | $.fn.naturalHeight = function() { return this[0].naturalHeight; }; | ||
+ | return; | ||
+ | } | ||
+ | $.fn.naturalWidth = function() { return img(this[0].src).width; }; | ||
+ | $.fn.naturalHeight = function() { return img(this[0].src).height; }; | ||
+ | })(jQuery); | ||
+ | |||
+ | |||
+ | |||
+ | function onWindowResize() | ||
+ | { | ||
+ | var curWidth = $(window).width(), | ||
+ | curHeight = $(window).height(), | ||
+ | checking=false; | ||
+ | if (checking) { | ||
+ | return; | ||
+ | } | ||
+ | checking = true; | ||
+ | window.setTimeout( | ||
+ | function() { | ||
+ | var newWidth = $(window).width(), | ||
+ | newHeight = $(window).height(); | ||
+ | if (!(newWidth !== curWidth || | ||
+ | newHeight !== curHeight)) { | ||
+ | resize(false); | ||
+ | } | ||
+ | checking=false; | ||
+ | }, 300); | ||
+ | } | ||
+ | |||
+ | function resize(initial) { | ||
+ | if (!initial) | ||
+ | { | ||
+ | var container = $('#container'); | ||
+ | var imgWidth = container.width(); | ||
+ | |||
+ | $( "#map").each(function() { | ||
+ | $(this).css('height', 'auto', 'width', 'auto'); | ||
+ | $(this).mapster('resize',Math.min(imgWidth, $(this).naturalWidth()) ,0,0); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | $(document).ready(function(){ | ||
+ | |||
+ | $('#map').mapster({ | ||
+ | fillColor: 'ffffff', | ||
+ | fillOpacity: 0.5, | ||
+ | isSelectable: false, | ||
+ | clickNavigate: true, | ||
+ | }); | ||
+ | |||
+ | |||
+ | |||
+ | $(window).resize( | ||
+ | function() | ||
+ | { | ||
+ | onWindowResize(); | ||
+ | }); | ||
+ | resize(true); | ||
+ | |||
+ | }); | ||
+ | |||
+ | </script> | ||
+ | |||
<center> | <center> | ||
<img usemap="#map" id="map" src="https://static.igem.org/mediawiki/2014/c/ce/ETH_Zurich_2014_Lab_overview_new.png" style="width:100%;"/> | <img usemap="#map" id="map" src="https://static.igem.org/mediawiki/2014/c/ce/ETH_Zurich_2014_Lab_overview_new.png" style="width:100%;"/> | ||
- | <map id="map" name="map"><area shape="rect" alt="" title="" coords="15,9,353,297" href="https://2014.igem.org/Team:ETH_Zurich/lab/bead" target="" /><area shape="rect" alt="" title="" coords="14,333,346,567" href="https://2014.igem.org/Team:ETH_Zurich/lab/chip" target="_self" /><area shape="rect" alt="" title="" coords="180,602,387,836" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Diffusion_On_Chip" target="_self" /><area shape="rect" alt="" title="" coords="471,636,914,744" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Quorum_Sensing" target="_self" /><area shape="rect" alt="" title="" coords="471,745,914,830" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Riboregulators" target="_self" /><area shape="rect" alt="" title="" coords="471,831,914,913" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Integrases" target="_self" /><area shape="rect" alt="" title="" coords="955,612,1468,892" href="https://2014.igem.org/Team:ETH_Zurich/lab/safety" target="_self" /><area shape="rect" alt="" title="" coords="1022,283,1386,570" href="https://2014.igem.org/Team:ETH_Zurich/lab/protocols" target="_self" /><area shape="rect" alt="" title="" coords="1052,29,1416,246" href="https://2014.igem.org/Team:ETH_Zurich/lab/ | + | <map id="map" name="map"><area shape="rect" alt="" title="" coords="15,9,353,297" href="https://2014.igem.org/Team:ETH_Zurich/lab/bead" target="" /><area shape="rect" alt="" title="" coords="14,333,346,567" href="https://2014.igem.org/Team:ETH_Zurich/lab/chip" target="_self" /><area shape="rect" alt="" title="" coords="180,602,387,836" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Diffusion_On_Chip" target="_self" /><area shape="rect" alt="" title="" coords="471,636,914,744" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Quorum_Sensing" target="_self" /><area shape="rect" alt="" title="" coords="471,745,914,830" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Riboregulators" target="_self" /><area shape="rect" alt="" title="" coords="471,831,914,913" href="https://2014.igem.org/Team:ETH_Zurich/expresults#Integrases" target="_self" /><area shape="rect" alt="" title="" coords="955,612,1468,892" href="https://2014.igem.org/Team:ETH_Zurich/lab/safety" target="_self" /><area shape="rect" alt="" title="" coords="1022,283,1386,570" href="https://2014.igem.org/Team:ETH_Zurich/lab/protocols" target="_self" /><area shape="rect" alt="" title="" coords="1052,29,1416,246" href="https://2014.igem.org/Team:ETH_Zurich/lab/sequences" target="_self" /><!-- Created by Online Image Map Editor (http://www.maschek.hu/imagemap/index) --></map> |
</center> | </center> | ||
</html> | </html> |
Latest revision as of 15:24, 15 October 2014