Team:ETH Zurich/slidermapinfo

From 2014.igem.org

(Difference between revisions)
Line 44: Line 44:
if (!initial)
if (!initial)
{
{
-
    var container =  $('#container1');
+
  var container =  $('#container1');
-
    var imgWidth = container.width();
+
  var imgWidth = container.width();
   $( "#map1").each(function() {
   $( "#map1").each(function() {
 +
      $(this).css('height', 'auto', 'width', 'auto');
 +
      $(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).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);   

Revision as of 18:52, 17 October 2014