vendor: 1,559 bytes, lines 1-63
1/*! 2 * Flickity imagesLoaded v2.0.0 3 * enables imagesLoaded option for Flickity 4 */ 5 6/*jshint browser: true, strict: true, undef: true, unused: true */ 7 8( function( window, factory ) { 9 // universal module definition 10 /*jshint strict: false */ /*globals define, module, require */ 11 if ( typeof define == 'function' && define.amd ) { 12 // AMD 13 define( [ 14 'flickity/js/index', 15 'imagesloaded/imagesloaded' 16 ], function( Flickity, imagesLoaded ) { 17 return factory( window, Flickity, imagesLoaded ); 18 }); 19 } else if ( typeof module == 'object' && module.exports ) { 20 // CommonJS 21 module.exports = factory( 22 window, 23 require('flickity'), 24 require('imagesloaded') 25 ); 26 } else { 27 // browser global 28 window.Flickity = factory( 29 window, 30 window.Flickity, 31 window.imagesLoaded 32 ); 33 } 34 35}( window, function factory( window, Flickity, imagesLoaded ) { 36'use strict'; 37 38Flickity.createMethods.push('_createImagesLoaded'); 39 40var proto = Flickity.prototype; 41 42proto._createImagesLoaded = function() { 43 this.on( 'activate', this.imagesLoaded ); 44}; 45 46proto.imagesLoaded = function() { 47 if ( !this.options.imagesLoaded ) { 48 return; 49 } 50 var _this = this; 51 function onImagesLoadedProgress( instance, image ) { 52 var cell = _this.getParentCell( image.img ); 53 _this.cellSizeChange( cell && cell.element ); 54 if ( !_this.options.freeScroll ) { 55 _this.positionSliderAtSelected(); 56 } 57 } 58 imagesLoaded( this.slider ).on( 'progress', onImagesLoadedProgress ); 59}; 60 61return Flickity; 62 63}));
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.