Ignore:
Timestamp:
Jun 19, 2011, 2:03:07 PM (13 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix bugs on height

File:
1 edited

Legend:

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

    r11277 r11429  
    258258       });
    259259
    260        jQuery(window).resize(
    261                function (event, ui) {
    262                  List_autosize_resize(event, ui);
    263                  jQuery().newResize();
    264                });
     260
    265261
    266262       jQuery(window).load(function () {
    267263         if (typeof img_width == "undefined") {
    268 
    269264           if (List_autosize.length == 0) return;
    270265           for (i = 0; i < List_autosize.length; i++) {
    271266             Autosize_resize(jQuery(List_autosize[i]));
    272267           }
    273 
    274268           return;
    275269         }
     
    351345       //=========================================================
    352346       old_window = { width: 0, height: 0 };
     347       jQuery(window).resize(
     348               function (event, ui) {
     349                 List_autosize_resize(event, ui);
     350                 jQuery().newResize();
     351               });
    353352
    354353       jQuery.fn.extend({
     
    531530               info_theImage = jQuery(theImg).infos();
    532531               info_the_page = jQuery("#the_page").infos();
     532               jQuery("#theImage").height(info_theImage.height);
     533               img_finale.height = info_theImage.height;
    533534
    534535               break
     
    596597               theImg = myPamoorama.image;
    597598               info_theImage = jQuery("#pamoorama").infos();
    598                info_theImage.height = img_reelle.height;
    599 
     599               //img_finale.height = info_theImage.height;
     600               //info_theImage.height = img_reelle.height;
     601
     602               info_theImage.height =info_theImage.height;
    600603
    601604               info_the_page = jQuery("#the_page").infos();
     
    714717           //==========================================================================
    715718           h = 0;
     719           Bandeau = 0;
    716720
    717721           h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
    718            Bandeau = Bandeau_t.img_top;
     722           if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top;
    719723           Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
    720724           //=========================================================================
     
    782786             }
    783787             widthmin -= marges;
    784              widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
    785              Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     788             if (typeof Bandeau_t != "undefined") {
     789               widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     790               Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     791             } else {
     792
     793               jQuery().newResize();
     794             }
    786795             if (Image_width > widthmin) {
    787796               //   Image_width largeur à atteindre
     
    811820           }
    812821           zoom = echelle;
    813            if (llgboframe.height > 0) {
     822           if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) {
    814823             //=============LLGBO2 ===========================
    815824             t1 = llgboframe;
    816825             if (!theImg.src) {
    817                theImg = jQuery(theImg).find("img").get(0)
     826               theImg = jQuery("#gbo").find("img").get(0)
    818827               if (!theImg.src) {
    819828                 theImg = jQuery(Parent).find("div").get(0)
     
    889898                 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
    890899               }
     900               jQuery("#theImage").height(heightgbo + marges_llgbo / 2);
    891901             }
    892902           }
     
    913923           // jQuery(Cadre).width(Zone_Affichage.width);
    914924           jQuery(Cadre).css("width", "auto");
    915            //   jQuery(Cadre).height(Zone_Affichage.height);
     925           if (Type_Img == "panorama" || Type_Img == "pamoorama")
     926           img_finale.height = info_theImage.height;
     927           Zone_Affichage.height = img_finale.height;
     928           jQuery(Cadre).height(Zone_Affichage.height);
    916929
    917930           if (typeof (gmaps) != "undefined") {
     
    10401053
    10411054
    1042            } else if (theImg.src) {
     1055           } else if (theImg != null && theImg.src) {
    10431056             //--- background ?? ---
    10441057             jQuery(theImg).height(img_finale.height);
     
    12421255
    12431256function Info_entete(Parent) {
    1244     if (typeof (marge_top) != "undefined") return result;
     1257
    12451258    info_imageToolBar = jQuery("#imageToolBar").infos();
    1246 
     1259    if (typeof (marge_top) != "undefined") return info_imageToolBar;
    12471260
    12481261    if (info_imageToolBar.position == "absolute") {
     
    13011314    llgboh2 = jQuery("#gboh2").infos();
    13021315    result.img_top += llgboh2.height;
     1316
    13031317    return result;
    13041318
Note: See TracChangeset for help on using the changeset viewer.