1(function ($) { 2 3 $.fn.collageGallery = function () { 4 5 if (!$(this).length) 6 return false; 7 8 this.each(function (e) { 9 var ugData = {}; 10 11 var ugSettings = $(this).data('ug'); 12 if (typeof ugSettings !== 'undefined') { 13 ugData = $.extend({}, ugDefaults, ugSettings); 14 } 15 else 16 ugData = ugDefaults; 17 18 $(this).justifiedGallery(ugData); 19 $(this).justifiedGallery().on('jg.complete', function (e) { 20 captionsLineHeight($(this), ugData); 21 //console.log('Complete'); 22 }); 23 24 }); 25 26 27 function captionsLineHeight(container, ugData) { 28 var captions = container.find('.caption'); 29 if (captions) { 30 var lineHeight = 0; 31 32 $.each(captions, function () { 33 34 if (!lineHeight) { 35 var captionCSS = { 36 top: Math.round(parseInt($(this).css('padding-top'))) || 0, 37 bottom: Math.round(parseInt($(this).css('padding-bottom'))) || 0, 38 lineHeight: Math.round(parseInt($(this).css('line-height'))) || 0, 39 boxSizing: $(this).css('box-sizing') || '' 40 }; 41 42 lineHeight = captionCSS.lineHeight * ugData.lineHeight; 43 44 if (captionCSS.boxSizing != 'content-box') { 45 lineHeight = lineHeight + captionCSS.top + captionCSS.bottom; 46 } 47 48 lineHeight = lineHeight + 'px'; 49 50 } 51 52 $(this).css('max-height', lineHeight); 53 54 55 }); 56 } 57 } 58 59 }; 60})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.