Changeset 27779
- Timestamp:
- 03/27/2014 07:24:04 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/jquery/jquery.masonry.js
r27271 r27779 10 10 */ 11 11 ( function( window ) { 12 13 'use strict'; 12 14 13 15 var Masonry = window.Masonry; … … 50 52 var __create = Masonry.prototype._create; 51 53 Masonry.prototype._create = function() { 54 var that = this; 52 55 this._remapV2Options(); 53 56 __create.apply( this, arguments ); 57 setTimeout( function() { 58 jQuery( that.element ).addClass( 'masonry' ); 59 }, 0 ); 54 60 }; 55 61 … … 66 72 }; 67 73 74 var __itemize = Masonry.prototype._itemize; 75 Masonry.prototype._itemize = function( elements ) { 76 var items = __itemize.apply( this, arguments ); 77 jQuery( elements ).addClass( 'masonry-brick' ); 78 return items; 79 }; 80 68 81 // re-enable using function for columnWidth 69 82 var _measureColumns = Masonry.prototype.measureColumns; … … 77 90 }; 78 91 92 Masonry.prototype.reload = function() { 93 this.reloadItems.apply( this, arguments ); 94 this.layout.apply( this ); 95 }; 96 97 var _destroy = Masonry.prototype.destroy; 98 Masonry.prototype.destroy = function() { 99 var items = this.getItemElements(); 100 jQuery( this.element ).removeClass( 'masonry' ); 101 jQuery( items ).removeClass( 'masonry-brick' ); 102 _destroy.apply( this, arguments ); 103 }; 104 79 105 })( window );
Note: See TracChangeset
for help on using the changeset viewer.