Ignore:
Timestamp:
Oct 24, 2010, 2:57:11 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bug.

File:
1 edited

Legend:

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

    r7369 r7375  
    2727          var old_w = 0;
    2828
     29          var llgboframe = jQuery("#gbo div:first");
     30          var marges_llgbo = 0;
     31          if (llgboframe.length > 0) {
     32
     33              marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
     34          }
     35       
    2936
    3037          //=========================================================
     
    208215                  info_description.bottom = info_description.top = 1;
    209216
    210               var llgboframe = jQuery("#gbo div:first");
    211               var marges_llgbo = 0;
    212               if (llgboframe.length > 0) {
    213 
    214                   marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
    215               }
    216217              if (theme.match(RegExp("gally", "g"))) {
    217                   marges_llgbo = 0;
     218                     marges_llgbo = 0;
    218219              }
    219220
     
    716717                  else
    717718                      widthmin = parseInt(width_user);
    718 
     719                 var marges = 0;
    719720                  widthmin -= Get_Val_int(info_img.borderwidth.left);
    720721                  widthmin -= Get_Val_int(info_img.borderwidth.right);
    721722                  if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) {
    722723                      llgboframe = jQuery("#gbo div:first");
    723                       marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth();
     724                      marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();
    724725                  }
    725                   widthmin -=2*marges;
     726                  widthmin -= 2 * marges;
    726727                  if (Image_width > widthmin) {
    727728                      //   Image_width largeur à atteindre
     
    761762                          _width = maxWidth;
    762763                      } else {
    763                           _width = Image_width - (marges/2);
     764                          _width = Image_width - (marges / 2);
    764765                      }
    765766
    766                         jQuery("#gbo").outerWidth(_width);
    767                         jQuery("#gbo").css("width", (_width) + "px");
    768                         jQuery("#gbo").css("height", (Image_height) + "px");
    769                         jQuery("#gbo").outerHeight(Image_height);
    770                         Image_width = jQuery("#gbo div:last").innerWidth();
    771                         Image_height = parseInt(Image_width / rapport);
     767                      jQuery("#gbo").outerWidth(_width);
     768                      jQuery("#gbo").css("width", (_width) + "px");
     769                      jQuery("#gbo").css("height", (Image_height) + "px");
     770                      jQuery("#gbo").outerHeight(Image_height);
     771                      Image_width = jQuery("#gbo div:last").innerWidth();
     772                      Image_height = parseInt(Image_width / rapport);
    772773
    773774                  } else {
     
    818819              }
    819820
    820  
     821
    821822              jQuery(Cadre).width(zone_affichage.width);
    822823              //==============================================================
     
    947948
    948949      } // function
    949 );                                                                                                                                                                                                                                                                                                                 // ready
     950);                                                                                                                                                                                                                                                                                                                  // ready
    950951    /*
    951952*
Note: See TracChangeset for help on using the changeset viewer.