diff --git a/README.md b/README.md index 917cab85..2ba23b23 100644 --- a/README.md +++ b/README.md @@ -82,4 +82,4 @@ Add a `data-isotope` attribute to your element. Options can be set in JSON in th * * * -By [Metafizzy](http://metafizzy.co), 2010–2017 +By [Metafizzy](https://metafizzy.co), 2010–2017 diff --git a/dist/isotope.pkgd.js b/dist/isotope.pkgd.js index 54ad1c7d..f4090853 100644 --- a/dist/isotope.pkgd.js +++ b/dist/isotope.pkgd.js @@ -1,10 +1,10 @@ /*! - * Isotope PACKAGED v3.0.4 + * Isotope PACKAGED v3.0.5 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * - * http://isotope.metafizzy.co + * https://isotope.metafizzy.co * Copyright 2017 Metafizzy */ @@ -153,7 +153,7 @@ return jQueryBridget; })); /** - * EvEmitter v1.0.3 + * EvEmitter v1.1.0 * Lil' event emitter * MIT License */ @@ -233,13 +233,14 @@ proto.emitEvent = function( eventName, args ) { if ( !listeners || !listeners.length ) { return; } - var i = 0; - var listener = listeners[i]; + // copy over to avoid interference if .off() in listener + listeners = listeners.slice(0); args = args || []; // once stuff var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; - while ( listener ) { + for ( var i=0; i < listeners.length; i++ ) { + var listener = listeners[i] var isOnce = onceListeners && onceListeners[ listener ]; if ( isOnce ) { // remove listener @@ -250,14 +251,16 @@ proto.emitEvent = function( eventName, args ) { } // trigger listener listener.apply( this, args ); - // get next listener - i += isOnce ? 0 : 1; - listener = listeners[i]; } return this; }; +proto.allOff = function() { + delete this._events; + delete this._onceEvents; +}; + return EvEmitter; })); @@ -2268,7 +2271,7 @@ return Outlayer; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'isotope/js/item',[ + define( 'isotope-layout/js/item',[ 'outlayer/outlayer' ], factory ); @@ -2346,7 +2349,7 @@ return Item; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'isotope/js/layout-mode',[ + define( 'isotope-layout/js/layout-mode',[ 'get-size/get-size', 'outlayer/outlayer' ], @@ -2496,9 +2499,9 @@ return Item; })); /*! - * Masonry v4.2.0 + * Masonry v4.2.1 * Cascading grid layout library - * http://masonry.desandro.com + * https://masonry.desandro.com * MIT License * by David DeSandro */ @@ -2508,7 +2511,7 @@ return Item; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'masonry/masonry',[ + define( 'masonry-layout/masonry',[ 'outlayer/outlayer', 'get-size/get-size' ], @@ -2738,7 +2741,7 @@ return Item; /*! * Masonry layout mode * sub-classes Masonry - * http://masonry.desandro.com + * https://masonry.desandro.com */ ( function( window, factory ) { @@ -2746,9 +2749,9 @@ return Item; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'isotope/js/layout-modes/masonry',[ + define( 'isotope-layout/js/layout-modes/masonry',[ '../layout-mode', - 'masonry/masonry' + 'masonry-layout/masonry' ], factory ); } else if ( typeof module == 'object' && module.exports ) { @@ -2819,7 +2822,7 @@ return Item; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'isotope/js/layout-modes/fit-rows',[ + define( 'isotope-layout/js/layout-modes/fit-rows',[ '../layout-mode' ], factory ); @@ -2888,7 +2891,7 @@ return FitRows; /* jshint strict: false */ /*globals define, module, require */ if ( typeof define == 'function' && define.amd ) { // AMD - define( 'isotope/js/layout-modes/vertical',[ + define( 'isotope-layout/js/layout-modes/vertical',[ '../layout-mode' ], factory ); @@ -2935,12 +2938,12 @@ return Vertical; })); /*! - * Isotope v3.0.4 + * Isotope v3.0.5 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * - * http://isotope.metafizzy.co + * https://isotope.metafizzy.co * Copyright 2017 Metafizzy */ @@ -2954,12 +2957,12 @@ return Vertical; 'get-size/get-size', 'desandro-matches-selector/matches-selector', 'fizzy-ui-utils/utils', - 'isotope/js/item', - 'isotope/js/layout-mode', + 'isotope-layout/js/item', + 'isotope-layout/js/layout-mode', // include default layout modes - 'isotope/js/layout-modes/masonry', - 'isotope/js/layout-modes/fit-rows', - 'isotope/js/layout-modes/vertical' + 'isotope-layout/js/layout-modes/masonry', + 'isotope-layout/js/layout-modes/fit-rows', + 'isotope-layout/js/layout-modes/vertical' ], function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) { return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ); @@ -2972,12 +2975,12 @@ return Vertical; require('get-size'), require('desandro-matches-selector'), require('fizzy-ui-utils'), - require('isotope/js/item'), - require('isotope/js/layout-mode'), + require('isotope-layout/js/item'), + require('isotope-layout/js/layout-mode'), // include default layout modes - require('isotope/js/layout-modes/masonry'), - require('isotope/js/layout-modes/fit-rows'), - require('isotope/js/layout-modes/vertical') + require('isotope-layout/js/layout-modes/masonry'), + require('isotope-layout/js/layout-modes/fit-rows'), + require('isotope-layout/js/layout-modes/vertical') ); } else { // browser global diff --git a/dist/isotope.pkgd.min.js b/dist/isotope.pkgd.min.js index be520aff..f6361b9c 100644 --- a/dist/isotope.pkgd.min.js +++ b/dist/isotope.pkgd.min.js @@ -1,12 +1,12 @@ /*! - * Isotope PACKAGED v3.0.4 + * Isotope PACKAGED v3.0.5 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * - * http://isotope.metafizzy.co + * https://isotope.metafizzy.co * Copyright 2017 Metafizzy */ -!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=0,n=i[o];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];n;){var r=s&&s[n];r&&(this.off(t,n),delete s[n]),n.apply(this,e),o+=r?0:1,n=i[o]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e