Team:ETH Zurich/slidermapchip
From 2014.igem.org
(Difference between revisions)
(3 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
- | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
(function($) { | (function($) { | ||
Line 44: | Line 43: | ||
if (!initial) | if (!initial) | ||
{ | { | ||
- | + | slider.redrawSlider(); | |
- | + | var container = $('#container1'); | |
+ | var imgWidth = container.width(); | ||
- | $( "# | + | $( "#map1").each(function() { |
$(this).css('height', 'auto', 'width', 'auto'); | $(this).css('height', 'auto', 'width', 'auto'); | ||
$(this).mapster('resize',Math.min(imgWidth, $(this).naturalWidth()) ,0,0); | $(this).mapster('resize',Math.min(imgWidth, $(this).naturalWidth()) ,0,0); | ||
}); | }); | ||
+ | |||
+ | container = $('#container2'); | ||
+ | imgWidth = container.width(); | ||
+ | |||
+ | $( "#map2").each(function() { | ||
+ | $(this).css('height', 'auto', 'width', 'auto'); | ||
+ | $(this).mapster('resize',Math.min(imgWidth, $(this).naturalWidth()) ,0,0); | ||
+ | }); | ||
+ | slider.redrawSlider(); | ||
} | } | ||
} | } | ||
- | |||
$(document).ready(function(){ | $(document).ready(function(){ | ||
+ | $('#map1').mapster({ | ||
+ | fillColor: 'FFFFFF', | ||
+ | fillOpacity: 0.5, | ||
+ | isSelectable: false, | ||
+ | clickNavigate: true, | ||
+ | }); | ||
+ | |||
$('#map2').mapster({ | $('#map2').mapster({ | ||
fillColor: 'FFFFFF', | fillColor: 'FFFFFF', |
Latest revision as of 18:58, 17 October 2014