Ignore:
Timestamp:
Nov 2, 2010, 1:56:10 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] adjust width with pamooramic.

Location:
extensions/Autosize/js
Files:
2 edited

Legend:

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

    r7572 r7574  
    355355              var winheight = jQuery(window).height();
    356356              if (old_w == winwidth && old_h == winheight) return;
     357
    357358
    358359
     
    437438                  var info_pamoorama_footer = jQuery("#pamoorama_footer").info();
    438439                  TheImg = jQuery("#pamoorama");
    439 
     440                  if (typeof (myPamoorama) == "undefined") {
     441                      return
     442
     443                  }
     444
     445
     446                  po = myPamoorama;
     447
     448                  /*
     449                  myPamoorama = new pamoorama('pamoorama',{ activateSlider:     {$PANO_ACTIVATESLIDER},
     450                  width:                {$PANO_WIDTH},
     451                  footercolor:          '{$PANO_FOOTERCOLOR}',
     452                  captioncolor:         '{$PANO_CAPTIONCOLOR}',
     453                  caption:              '{$ALT_IMG}',
     454                  enableAutoscroll:     {$PANO_ENABLEAUTOSCROLL},
     455                  autoscrollSpeed:      {$PANO_AUTOSCROLLSPEED},
     456                  autoscrollOnLoad:     {$PANO_AUTOSCROLLONLOAD},
     457                  startAutoscroll:      '{'pamooramics_startAutoscroll'|@translate}',
     458                  stopAutoscroll:               '{'pamooramics_stopAutoscroll'|@translate}',
     459                  loadingMessage: '{'pamooramics_loading'|@translate}',
     460                  clickMessage:         '{'pamooramics_clickMessage'|@translate}',
     461                  dragMessage:          '{'pamooramics_dragMessage'|@translate}'
     462                  });
     463                  */
    440464                  /*
    441465                  pamoorama_outter
     
    547571                  case "pamoorama":
    548572                      //=========================================================
    549                       var Images = jQuery("#pamoorama img");
    550                       var Image = jQuery("#pamoorama").find("img");
    551 
     573
     574
     575                      if (typeof (myPamoorama.imageHeight) == "undefined") return;
     576
     577                      img_reelle.height = myPamoorama.imageHeight;
     578                      img_reelle.width = myPamoorama.imageWidth;
     579                      TheImg = myPamoorama.image;
    552580                      info_theImage = jQuery("#pamoorama").info();
    553581                      info_the_page = jQuery("#the_page").info();
     582
    554583                      break
    555584
     
    875904
    876905              } else if (Type_Img == "pamoorama") {
    877                   return;
     906
     907                  img_height = myPamoorama.imageHeight
    878908
    879909                  marge_left += 0;
    880910                  new_width = Zone_Affichage.width - marge_right - marge_left;
    881                   jQuery("#pamoorama").css({ margin: 0 + "px",
    882                       left: marge_left + "px",
     911                  new_width -= 4;
     912                  jQuery("#pamoorama").css({ marginLeft: "auto",
     913                      marginRight: "auto",
     914
    883915                      height: Image_height + info_pamoorama_footer.height + "px",
    884916                      width: new_width + "px"
    885917                  });
    886918
     919                  myPamoorama.options.width = new_width;
    887920                  jQuery("#pamoorama").width(new_width);
     921
     922
    888923
    889924
    890925                  jQuery("#pamoorama_outter").css({
    891926                      left: marge_left + "px",
    892                       height: Image_height + "px",
     927                      height: myPamoorama.imageHeight + "px",
    893928                      width: (new_width) + "px"
    894929                  });
    895930                  jQuery("#pamoorama_outter").width(new_width);
    896 
    897 
    898                   jQuery("#pamoorama_footer").width((Zone_Affichage.width - marge_right - marge_left));
    899                   jQuery("#pamoorama_footer").css('width', (Zone_Affichage.width - marge_right - marge_left) + "px");
     931                  h = info_theImage.height;
     932                  jQuery("#pamoorama").css({ height: h + "px" });
     933
     934                  jQuery("#pamoorama_footer").width(new_width);
     935                  jQuery("#pamoorama_footer").css('width', new_width + "px");
     936
     937                  jQuery("#linkNext").css({ width: "200px", overflow: "hidden" });
     938                  jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" });
    900939                  zoom = Image_height / img_height;
    901                   info_pamoorama_outter = jQuery("#pamoorama_outter").info();
    902 
    903                   h_frame = jQuery("#pamoorama").width();
    904                   if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) {
    905 
    906                       /*   if (info_pamoorama_outter.width == 0)
    907                       setTimeout("wait_Timer()", 100);
    908                       */
    909                       //     jQuery(TheImg).css("zoom", zoom);
    910                   }
     940                  var init_old_w;
     941                  if (init_old_w == 0) {
     942                      init_old_w = old_w;
     943                      old_w = 0;
     944                  }
     945
    911946
    912947
     
    10221057
    10231058      } // function
    1024 );                                                                                                                                                                                                                                                                                                                                                                                                                                       // ready
     1059);                                                                                                                                                                                                                                                                                                                                                                                                                                                       // ready
    10251060    /*
    10261061*
  • extensions/Autosize/js/conflit.js

    r7542 r7574  
    11//==== autosize  remplace $(... avec jQuery( ====
    22var d1 = 0;
    3 var init_tb = 0;             
    4 
     3var init_tb = 0;
     4function ne(a) {
     5    return new V(a[ib], a[hc])
     6}
    57
    68 function $(element, nc) {
     
    1719          if (tpj.length > 0) {             }
    1820          jQuery(window).load(function () {
     21
     22
    1923              if (jQuery("#theImage").css("position") == "relative") {
    2024                  //==== compatibilité Gally/LLGBO ===
     
    374378
    375379//=========================================================
    376 (function ($) {
    377               $.fn.panorama2 =
     380(function ($2) {
     381              $2.fn.panorama2 =
    378382              function (height, width) {
    379383               
Note: See TracChangeset for help on using the changeset viewer.