1(function ($, Drupal, once) { 2 3 'use strict'; 4 5 Drupal.behaviors.usgs_masonry = { 6 attach: function(context, settings) { 7 if (settings.views && settings.views.ajaxViews && settings.masonry) { 8 var instances = settings.views.ajaxViews; 9 $.each(instances, function(view, settings) { 10 var viewClass = '.js-view-dom-id-' + settings.view_dom_id; 11 var viewName = settings.view_name.replaceAll('_', '-'); 12 var masonryContainer = '.masonry-layout-' + viewName; 13 14 // Use once() to prevent duplicate initialization on the same container 15 $(once('usgs-masonry-' + viewName, masonryContainer, context)).each(function() { 16 var $container = $(this); 17 $container.imagesLoaded(function () { 18 $container.masonry({ 19 itemSelector: '.masonry-item', 20 columnWidth: '.grid-sizer', 21 gutter: '.gutter-sizer', 22 }); 23 }); 24 }); 25 }); 26 } 27 } 28 }; 29 30})(jQuery, Drupal, once);
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.