Ignore:
Timestamp:
Dec 29, 2013, 10:23:57 PM (10 years ago)
Author:
rvelices
Message:

smart pocket new thumbnail display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/smartpocket/js/smartpocket.js

    r25938 r26349  
    2828                        }
    2929                });
    30                 $(window).bind('orientationchange', set_thumbnails_width);
    31                 set_thumbnails_width();
     30                var spThumbs = new SPThumbs(SPThumbsOpts);
    3231  });
    3332}(window, window.jQuery, window.Code.PhotoSwipe));
    3433
    35 function set_thumbnails_width() {
    36         var dpr = 1 //window.devicePixelRatio>1 ? window.devicePixelRatio : 1
    37                 , nb_thumbs = Math.max(2, Math.ceil($('.thumbnails').width() / (var_thumb_width/dpr+2*5)))
    38                 , width = Math.floor(1000000 / nb_thumbs) / 10000;
    39         $('.thumbnails li').css('width', width+'%');
    40 }
    41 
Note: See TracChangeset for help on using the changeset viewer.