This repository has been archived by the owner. It is now read-only.

Gallery Widget #120

Merged
merged 43 commits into from Sep 19, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+2 −3
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Fix rendering on change and reset

  • Loading branch information...
westonruter committed Sep 16, 2017
commit ece64e9a8dc64d5a9f1e6dfaa44d6ce625ca3b48
@@ -86,8 +86,8 @@
_.bindAll( control, 'updateSelectedAttachments' );
control.selectedAttachments = new wp.media.model.Attachments();
control.model.on( 'change:ids', control.updateSelectedAttachments );
control.selectedAttachments.on( 'change', control.render );
control.selectedAttachments.on( 'reset', control.render );
control.selectedAttachments.on( 'change', control.renderPreview );
control.selectedAttachments.on( 'reset', control.renderPreview );
control.updateSelectedAttachments();
},
@@ -119,7 +119,6 @@
});
addedQuery.more().done( function() {
control.selectedAttachments.reset( addedQuery.models );
control.renderPreview(); // @todo Should get triggered with reset.
});
}
},
ProTip! Use n and p to navigate between commits in a pull request.