Ticket #22748: 22748.diff
File 22748.diff, 1.2 KB (added by , 12 years ago) |
---|
-
wp-includes/js/media-views.js
3111 3111 refreshSensitivity: 200, 3112 3112 refreshThreshold: 3, 3113 3113 AttachmentView: media.view.Attachment, 3114 sortable: false 3114 sortable: false, 3115 resize: true 3115 3116 }); 3116 3117 3117 3118 this._viewsByCid = {}; … … 3140 3141 _.bindAll( this, 'css' ); 3141 3142 this.model.on( 'change:edge change:gutter', this.css, this ); 3142 3143 this._resizeCss = _.debounce( _.bind( this.css, this ), this.refreshSensitivity ); 3143 $(window).on( 'resize.attachments', this._resizeCss ); 3144 if ( this.options.resize ) 3145 $(window).on( 'resize.attachments', this._resizeCss ); 3144 3146 this.css(); 3145 3147 }, 3146 3148 … … 3170 3172 if ( ! this.$el.is(':visible') ) 3171 3173 return edge; 3172 3174 3173 3174 3175 gutter = this.model.get('gutter') * 2; 3175 3176 width = this.$el.width() - gutter; 3176 3177 columns = Math.ceil( width / ( edge + gutter ) ); … … 3672 3673 collection: this.collection, 3673 3674 selection: this.collection, 3674 3675 sortable: true, 3676 resize: false, 3675 3677 model: new Backbone.Model({ 3676 3678 edge: 40, 3677 3679 gutter: 5