diff --git a/README.md b/README.md
index 0153c93d..77778bd5 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@ See [masonry.desandro.com](http://masonry.desandro.com) for complete docs and de
Link directly to Masonry files on [unpkg](https://unpkg.com/).
``` html
-
+
-
+
```
### Package managers
diff --git a/dist/masonry.pkgd.js b/dist/masonry.pkgd.js
index adf62864..6803cb5c 100644
--- a/dist/masonry.pkgd.js
+++ b/dist/masonry.pkgd.js
@@ -1,5 +1,5 @@
/*!
- * Masonry PACKAGED v4.1.1
+ * Masonry PACKAGED v4.2.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
@@ -471,7 +471,7 @@ return getSize;
});
/**
- * matchesSelector v2.0.1
+ * matchesSelector v2.0.2
* matchesSelector( element, '.selector' )
* MIT license
*/
@@ -497,7 +497,7 @@ return getSize;
'use strict';
var matchesMethod = ( function() {
- var ElemProto = Element.prototype;
+ var ElemProto = window.Element.prototype;
// check for the standard method name first
if ( ElemProto.matches ) {
return 'matches';
@@ -525,7 +525,7 @@ return getSize;
}));
/**
- * Fizzy UI utils v2.0.2
+ * Fizzy UI utils v2.0.4
* MIT license
*/
@@ -586,7 +586,8 @@ utils.makeArray = function( obj ) {
if ( Array.isArray( obj ) ) {
// use object if already an array
ary = obj;
- } else if ( obj && typeof obj.length == 'number' ) {
+ } else if ( obj && typeof obj == 'object' &&
+ typeof obj.length == 'number' ) {
// convert nodeList to array
for ( var i=0; i < obj.length; i++ ) {
ary.push( obj[i] );
@@ -698,7 +699,8 @@ utils.debounceMethod = function( _class, methodName, threshold ) {
utils.docReady = function( callback ) {
var readyState = document.readyState;
if ( readyState == 'complete' || readyState == 'interactive' ) {
- callback();
+ // do async to allow for other scripts to run. metafizzy/flickity#441
+ setTimeout( callback );
} else {
document.addEventListener( 'DOMContentLoaded', callback );
}
@@ -746,7 +748,7 @@ utils.htmlInit = function( WidgetClass, namespace ) {
}
// initialize
var instance = new WidgetClass( elem, options );
- // make available via $().data('layoutname')
+ // make available via $().data('namespace')
if ( jQuery ) {
jQuery.data( elem, namespace, instance );
}
@@ -2256,7 +2258,7 @@ return Outlayer;
}));
/*!
- * Masonry v4.1.1
+ * Masonry v4.2.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
@@ -2298,7 +2300,9 @@ return Outlayer;
// isFitWidth -> fitWidth
Masonry.compatOptions.fitWidth = 'isFitWidth';
- Masonry.prototype._resetLayout = function() {
+ var proto = Masonry.prototype;
+
+ proto._resetLayout = function() {
this.getSize();
this._getMeasurement( 'columnWidth', 'outerWidth' );
this._getMeasurement( 'gutter', 'outerWidth' );
@@ -2311,9 +2315,10 @@ return Outlayer;
}
this.maxY = 0;
+ this.horizontalColIndex = 0;
};
- Masonry.prototype.measureColumns = function() {
+ proto.measureColumns = function() {
this.getContainerWidth();
// if columnWidth is 0, default to outerWidth of first item
if ( !this.columnWidth ) {
@@ -2338,7 +2343,7 @@ return Outlayer;
this.cols = Math.max( cols, 1 );
};
- Masonry.prototype.getContainerWidth = function() {
+ proto.getContainerWidth = function() {
// container is parent if fit width
var isFitWidth = this._getOption('fitWidth');
var container = isFitWidth ? this.element.parentNode : this.element;
@@ -2348,7 +2353,7 @@ return Outlayer;
this.containerWidth = size && size.innerWidth;
};
- Masonry.prototype._getItemLayoutPosition = function( item ) {
+ proto._getItemLayoutPosition = function( item ) {
item.getSize();
// how many columns does this brick span
var remainder = item.size.outerWidth % this.columnWidth;
@@ -2356,33 +2361,41 @@ return Outlayer;
// round if off by 1 pixel, otherwise use ceil
var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
colSpan = Math.min( colSpan, this.cols );
-
- var colGroup = this._getColGroup( colSpan );
- // get the minimum Y value from the columns
- var minimumY = Math.min.apply( Math, colGroup );
- var shortColIndex = colGroup.indexOf( minimumY );
-
+ // use horizontal or top column position
+ var colPosMethod = this.options.horizontalOrder ?
+ '_getHorizontalColPosition' : '_getTopColPosition';
+ var colPosition = this[ colPosMethod ]( colSpan, item );
// position the brick
var position = {
- x: this.columnWidth * shortColIndex,
- y: minimumY
+ x: this.columnWidth * colPosition.col,
+ y: colPosition.y
};
-
// apply setHeight to necessary columns
- var setHeight = minimumY + item.size.outerHeight;
- var setSpan = this.cols + 1 - colGroup.length;
- for ( var i = 0; i < setSpan; i++ ) {
- this.colYs[ shortColIndex + i ] = setHeight;
+ var setHeight = colPosition.y + item.size.outerHeight;
+ var setMax = colSpan + colPosition.col;
+ for ( var i = colPosition.col; i < setMax; i++ ) {
+ this.colYs[i] = setHeight;
}
return position;
};
+ proto._getTopColPosition = function( colSpan ) {
+ var colGroup = this._getTopColGroup( colSpan );
+ // get the minimum Y value from the columns
+ var minimumY = Math.min.apply( Math, colGroup );
+
+ return {
+ col: colGroup.indexOf( minimumY ),
+ y: minimumY,
+ };
+ };
+
/**
* @param {Number} colSpan - number of columns the element spans
* @returns {Array} colGroup
*/
- Masonry.prototype._getColGroup = function( colSpan ) {
+ proto._getTopColGroup = function( colSpan ) {
if ( colSpan < 2 ) {
// if brick spans only one column, use all the column Ys
return this.colYs;
@@ -2393,15 +2406,38 @@ return Outlayer;
var groupCount = this.cols + 1 - colSpan;
// for each group potential horizontal position
for ( var i = 0; i < groupCount; i++ ) {
- // make an array of colY values for that one group
- var groupColYs = this.colYs.slice( i, i + colSpan );
- // and get the max value of the array
- colGroup[i] = Math.max.apply( Math, groupColYs );
+ colGroup[i] = this._getColGroupY( i, colSpan );
}
return colGroup;
};
- Masonry.prototype._manageStamp = function( stamp ) {
+ proto._getColGroupY = function( col, colSpan ) {
+ if ( colSpan < 2 ) {
+ return this.colYs[ col ];
+ }
+ // make an array of colY values for that one group
+ var groupColYs = this.colYs.slice( col, col + colSpan );
+ // and get the max value of the array
+ return Math.max.apply( Math, groupColYs );
+ };
+
+ // get column position based on horizontal index. #873
+ proto._getHorizontalColPosition = function( colSpan, item ) {
+ var col = this.horizontalColIndex % this.cols;
+ var isOver = colSpan > 1 && col + colSpan > this.cols;
+ // shift to next row if item can't fit on current row
+ col = isOver ? 0 : col;
+ // don't let zero-size items take up space
+ var hasSize = item.size.outerWidth && item.size.outerHeight;
+ this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
+
+ return {
+ col: col,
+ y: this._getColGroupY( col, colSpan ),
+ };
+ };
+
+ proto._manageStamp = function( stamp ) {
var stampSize = getSize( stamp );
var offset = this._getElementOffset( stamp );
// get the columns that this stamp affects
@@ -2424,7 +2460,7 @@ return Outlayer;
}
};
- Masonry.prototype._getContainerSize = function() {
+ proto._getContainerSize = function() {
this.maxY = Math.max.apply( Math, this.colYs );
var size = {
height: this.maxY
@@ -2437,7 +2473,7 @@ return Outlayer;
return size;
};
- Masonry.prototype._getContainerFitWidth = function() {
+ proto._getContainerFitWidth = function() {
var unusedCols = 0;
// count unused columns
var i = this.cols;
@@ -2451,7 +2487,7 @@ return Outlayer;
return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
};
- Masonry.prototype.needsResizeLayout = function() {
+ proto.needsResizeLayout = function() {
var previousWidth = this.containerWidth;
this.getContainerWidth();
return previousWidth != this.containerWidth;
diff --git a/dist/masonry.pkgd.min.js b/dist/masonry.pkgd.min.js
index 3410a360..a61c0ded 100644
--- a/dist/masonry.pkgd.min.js
+++ b/dist/masonry.pkgd.min.js
@@ -1,9 +1,9 @@
/*!
- * Masonry PACKAGED v4.1.1
+ * Masonry PACKAGED v4.2.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
* by David DeSandro
*/
-!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,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.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=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(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||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}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=-1==t.indexOf("%")&&!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;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,E=a.borderTopWidth+a.borderBottomWidth,z=d&&s,b=t(r.width);b!==!1&&(a.width=b+(z?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(z?0:g+E)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+E),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},i.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),s=o.indexOf(r),a={x:this.columnWidth*s,y:r},h=r+t.size.outerHeight,u=this.cols+1-o.length,d=0;u>d;d++)this.colYs[s+d]=h;return a},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
\ No newline at end of file
+!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,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.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=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(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||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}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=-1==t.indexOf("%")&&!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;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 3be2703d..c52152e3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -120,11 +120,6 @@ gulp.task( 'version', function() {
gulp.src( [ 'package.json' ] )
.pipe( replace( /"version": "\d\.\d+\.\d+"/, '"version": "' + version + '"' ) )
.pipe( gulp.dest('.') );
- // replace CDN links in README
- var minorVersion = version.match( /^\d\.\d+/ )[0];
- gulp.src('README.md')
- .pipe( replace( /masonry\-layout@\d\.\d+/g, 'masonry-layout@' + minorVersion ))
- .pipe( gulp.dest('.') );
});
// ----- default ----- //
diff --git a/masonry.js b/masonry.js
index 9f85c047..f045c896 100644
--- a/masonry.js
+++ b/masonry.js
@@ -1,5 +1,5 @@
/*!
- * Masonry v4.1.1
+ * Masonry v4.2.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
diff --git a/package.json b/package.json
index 0e601269..ae1ebb55 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "masonry-layout",
- "version": "4.1.1",
+ "version": "4.2.0",
"description": "Cascading grid layout library",
"main": "masonry.js",
"dependencies": {