Changeset 27126


Ignore:
Timestamp:
Feb 1, 2014, 2:34:03 PM (10 years ago)
Author:
Miklfe
Message:

Correction d'un bug dans slideshow.js: affichage des image ratio non respecté

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slide/js/slideshow.js

    r26915 r27126  
    7777                                                }
    7878                                               
    79                                 $('ul',ele).append($('<li />').addClass('img-' + i).append($('<div />').addClass('contenerImg').width(options.width).height(cont_h).append(blockImg)));
    80        
     79                                        $('ul',ele).append($('<li />').addClass('img-' + i).append($('<div />').addClass('contenerImg').width(options.width).height(cont_h).append(blockImg)));
     80                               
     81                                        var $block = $('.img-'+ i ,ele);
     82                                        _resizeSlideshowImag($block)    ;
    8183
    8284                                });
    8385
    84                         _resizeSlideshowImag()  ;
    8586       
    8687                //resize and center image_____________________________________________________________________________________________________
    8788                               
    88                                 function _resizeSlideshowImag (){
    89                                         var e = $('ul',ele);
    90                                        
    91                                         e.each(function(){
    92                                                
    93                                         var $img                = e.find('img'),
    94                                                 $descr          = e.find('.descr'),
     89                                function _resizeSlideshowImag ($block){
     90
     91                                        var $img                = $block.find('img'),
     92                                                $descr          = $block.find('.descr'),
    9593                                                $img_w          = $img.width(),
    9694                                                $img_h          = $img.height(),
     
    10199                                                $new_h,
    102100                                                $new_w;
    103 
    104101                                       
    105102                                        if(($img_h > $box_h) || ($img_w > $box_w)){
     
    132129                                                bottom  : (($box_h / 2)-($new_h / 2)) + 'px',
    133130                                        })
    134                                 })
     131                        //      })
    135132                                };
    136133//slide_____________________________________________________________________________________________
Note: See TracChangeset for help on using the changeset viewer.