Ignore:
Timestamp:
Oct 23, 2012, 3:04:22 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (rv map)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r18724 r18725  
    106106        infos_pamoorama = jQuery("#pamoorama").infos({ absolute: true });
    107107
    108       } else if (jQuery("#map").length) {
     108      } else if (jQuery("#map").length > 0 || jQuery("#mapPicture").length > 0) {
    109109        Type_Img = "map";
    110110      } else if (jQuery("#Panorama").length) {
     
    546546
    547547
     548
    548549    jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
    549550    jQuery('#derivativeChecked' + options.pictureSelType).css('visibility', 'visible');
     
    885886      n = Get_dimensions(true, options);
    886887
     888      if (n == false) return;
     889
    887890      Save_cookies(options);
    888891      if (options.pictureSelType != "Autosize" && options.pictureSelType != "SelMaxi") {
     
    891894      }
    892895      infos_theImage = jQuery(theImage_id).infos(true);
    893       if (typeof img_finale == "undifined") img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
     896      if (typeof img_finale == "undefined") img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
    894897      if (img_finale.width && (img_finale.width != Zone_image.image.width || img_finale.height != Zone_image.image.height)) {
    895 
    896898        img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
    897899      }
     
    12091211    //===========================================
    12101212    Set_Map = function (nds) {
    1211       p0 = jQuery("#map").position();
     1213      p0 = jQuery("#map").offset();
    12121214      if (!p0) return;
    1213 
    1214       infos_map = jQuery("#map").infos();
    1215       // if (infos_map.width == (Zone_image.container.width - p0.left))   return ;
    1216       nds = jQuery("#imageInfos").css("display");
    1217       if (nds != "none") {
    1218         p2 = jQuery("#infoSwitcher").infos();
    1219         p0.left += 35;
    1220       }
    1221       jQuery("#map").width(Zone_image.image.width);
    1222       jQuery("#map").css({ height: Zone_image.image.height + "px" });
    1223 
     1215      infos_mapPicture = jQuery("#mapPicture").infos({ absolute: true });
     1216      infos_theImage = jQuery("#theImage").infos({ absolute: true });
     1217      jQuery("#map").removeAttr("height");
     1218      jQuery("#map").removeAttr("width");
     1219      jQuery("#map").width(infos_theImage.width - (infos_mapPicture.width));
     1220      jQuery("#map").height(jQuery(window).height()-infos_theImage.top-infos_theImage.general.marges.height);
    12241221      return true;
    12251222    }
     
    14931490      // commentContent
    14941491      // copyright
    1495    
     1492
    14961493
    14971494
     
    16601657      options.theImageWidth = new_dim.width;
    16611658      options.theImageHeight = new_dim.height;
    1662 
    1663 
    16641659      if (options.theImageBottom < 0) {
    16651660        options.theImageBottom = 0;
    16661661      }
     1662
     1663
     1664
    16671665      var chk = eval("options." + user_status + "_enabled");
    16681666      if (chk == "") { return; }
    16691667
    1670       Select_Image();
    1671       infos_theMainImage = jQuery(theMainImage_id).infos();
     1668      if (Type_Img == "img")
     1669        Select_Image();
     1670      infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true });
    16721671      Zone_image.src = infos_theMainImage.src;
    16731672      useMap = options.pictureSelType;
     
    21392138
    21402139
    2141   });                                                                                                                                                                                                                                                                                                                                                                                                                                                      // ready
     2140  });                                                                                                                                                                                                                                                                                                                                                                                                                                                            // ready
    21422141
    21432142
Note: See TracChangeset for help on using the changeset viewer.