Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flickity-imagesloaded

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flickity-imagesloaded - npm Package Compare versions

Comparing version 1.0.4 to 2.0.0

12

bower.json
{
"name": "flickity-imagesloaded",
"main": "flickity-imagesloaded.js",
"version": "1.0.4",
"dependencies": {
"flickity": "^1.0.0",
"imagesloaded": "^3.1.8"
"flickity": "^2.0.0",
"imagesloaded": "^4.1.0"
},
"devDependencies": {
"qunit": "~1.17.1"
"qunit": "^2.0.0"
},

@@ -17,7 +16,2 @@ "homepage": "https://github.com/metafizzy/flickity-imagesloaded",

"description": "Enable imagesLoaded option for Flickity",
"moduleType": [
"amd",
"globals",
"node"
],
"keywords": [

@@ -24,0 +18,0 @@ "flickity",

/*!
* Flickity imagesLoaded v1.0.4
* Flickity imagesLoaded v2.0.0
* enables imagesLoaded option for Flickity

@@ -9,6 +9,4 @@ */

( function( window, factory ) {
/*global define: false, module: false, require: false */
'use strict';
// universal module definition
/*jshint strict: false */ /*globals define, module, require */
if ( typeof define == 'function' && define.amd ) {

@@ -22,3 +20,3 @@ // AMD

});
} else if ( typeof exports == 'object' ) {
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS

@@ -44,7 +42,9 @@ module.exports = factory(

Flickity.prototype._createImagesLoaded = function() {
var proto = Flickity.prototype;
proto._createImagesLoaded = function() {
this.on( 'activate', this.imagesLoaded );
};
Flickity.prototype.imagesLoaded = function() {
proto.imagesLoaded = function() {
if ( !this.options.imagesLoaded ) {

@@ -51,0 +51,0 @@ return;

{
"name": "flickity-imagesloaded",
"version": "1.0.4",
"version": "2.0.0",
"description": "Enable imagesLoaded option for Flickity",
"main": "flickity-imagesloaded.js",
"dependencies": {
"flickity": "^1.0.0",
"imagesloaded": "^3.1.8"
"flickity": "^2.0.0",
"imagesloaded": "^4.1.0"
},
"devDependencies": {},
"scripts": {

@@ -28,3 +29,6 @@ "test": "echo \"Error: no test specified\" && exit 1"

},
"homepage": "https://github.com/metafizzy/flickity-imagesloaded"
"homepage": "https://github.com/metafizzy/flickity-imagesloaded",
"directories": {
"test": "test"
}
}

@@ -6,3 +6,3 @@ # Flickity imagesLoaded

``` js
var flkty = new Flickity( '.main-gallery', {
var flkty = new Flickity( '.carousel', {
// re-position cells when images load

@@ -25,3 +25,3 @@ imagesLoaded: true

requirejs( [ 'path/to/flickity-imagesloaded' ], function( Flickity ) {
var flkty = new Flickity( '.gallery', {
var flkty = new Flickity( '.carousel', {
imagesLoaded: true

@@ -37,3 +37,3 @@ });

var flkty = new Flickity( '.gallery', {
var flkty = new Flickity( '.carousel', {
imagesLoaded: true

@@ -40,0 +40,0 @@ });

@@ -1,2 +0,2 @@

test( 'images-in-divs-in-divs', function( assert ) {
QUnit.test( 'images-in-divs-in-divs', function( assert ) {
'use strict';

@@ -16,9 +16,9 @@

var cell = flkty.cells[i];
ok( cell.size.width, 'cell has width' );
assert.ok( cell.size.width, 'cell has width' );
var isApprox = isPositionApprox( cell.element.style.left, cell.x );
ok( isApprox, 'cell ' + i + 'at proper position' );
assert.ok( isApprox, 'cell ' + i + 'at proper position' );
cellX += cell.size.width;
}
equal( flkty.viewport.style.height, '140px', 'gallery height set' );
assert.equal( flkty.viewport.style.height, '140px', 'gallery height set' );

@@ -25,0 +25,0 @@ done();

@@ -1,2 +0,2 @@

test( 'images-in-divs', function( assert ) {
QUnit.test( 'images-in-divs', function( assert ) {
'use strict';

@@ -16,9 +16,9 @@

var cell = flkty.cells[i];
ok( cell.size.width, 'cell has width' );
assert.ok( cell.size.width, 'cell has width' );
var isApprox = isPositionApprox( cell.element.style.left, cell.x );
ok( isApprox, 'cell ' + i + 'at proper position' );
assert.ok( isApprox, 'cell ' + i + 'at proper position' );
cellX += cell.size.width;
}
equal( flkty.viewport.style.height, '140px', 'gallery height set' );
assert.equal( flkty.viewport.style.height, '140px', 'gallery height set' );

@@ -25,0 +25,0 @@ done();

@@ -1,2 +0,2 @@

test( 'images', function( assert ) {
QUnit.test( 'images', function( assert ) {
'use strict';

@@ -16,9 +16,9 @@

var cell = flkty.cells[i];
ok( cell.size.width, 'cell has width' );
assert.ok( cell.size.width, 'cell has width' );
var isApprox = isPositionApprox( cell.element.style.left, cell.x );
ok( isApprox, 'cell ' + i + 'at proper position' );
assert.ok( isApprox, 'cell ' + i + 'at proper position' );
cellX += cell.size.width;
}
equal( flkty.viewport.style.height, '140px', 'gallery height set' );
assert.equal( flkty.viewport.style.height, '140px', 'gallery height set' );

@@ -25,0 +25,0 @@ done();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc