mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 04:11:10 +01:00
3028e6e7fb
Built from https://develop.svn.wordpress.org/trunk@27389 git-svn-id: http://core.svn.wordpress.org/trunk@27237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
11 lines
1.3 KiB
JavaScript
11 lines
1.3 KiB
JavaScript
/*!
|
|
* Masonry v2 shim
|
|
* to maintain backwards compatibility
|
|
* as of Masonry v3.1.2
|
|
*
|
|
* Cascading grid layout library
|
|
* http://masonry.desandro.com
|
|
* MIT License
|
|
* by David DeSandro
|
|
*/
|
|
!function(a){var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?b.prototype.options.transitionDuration:0),void 0===a||a){var c=this.options.animationOptions,d=c&&c.duration;d&&(this.options.transitionDuration="string"==typeof d?d:d+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){this._remapV2Options(),c.apply(this,arguments)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),f.apply(this,arguments)}}(window); |