Skip to content

Commit

Permalink
Reinit masonry to accommodate newt pls
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Sep 26, 2017
1 parent 331a21e commit 18ea5db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions assets/front-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ jQuery( function ( $ ) {

$templates.append( $tpl );
}

try {
$templates.masonry( 'destroy' );
} catch ( e ) {}
$templates.masonry();

},

commTplExtraMarkup: function( tpl, $tpl ) {
Expand Down Expand Up @@ -138,8 +144,6 @@ jQuery( function ( $ ) {
' and save some templates.</h4>'
);

$mydesigns.find( '.templates-wrap' ).masonry();

},

commTpls: function (tpls) {
Expand Down Expand Up @@ -193,8 +197,6 @@ jQuery( function ( $ ) {
$communitydesigns.append( $div );
}

$mydesigns.find( '.templates-wrap' ).masonry();

},

doneLoading: function () {
Expand Down
2 changes: 1 addition & 1 deletion assets/front-end.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 18ea5db

Please sign in to comment.