Don't fire resize event when recycling a card

This commit is contained in:
Oliver Hamlet
2016-03-13 11:43:40 +00:00
parent 07108cef81
commit 10f9a61b55
+6 -4
View File
@@ -193,7 +193,7 @@ loot-clear-metadata
_dataChanged(newValue, oldValue) {
if (newValue) {
/* Initialise the card content data. */
this.updateContent(true);
this.updateContent(true, true);
this.updateStyling();
/* Set icons' visibility */
@@ -239,7 +239,7 @@ loot-clear-metadata
}
},
updateContent(updateBodyContent) {
updateContent(updateBodyContent, suppressResizeEvent) {
if (this.data) {
const cardContent = this.data.getCardContent(loot.filters);
@@ -251,8 +251,10 @@ loot-clear-metadata
this._setTagsContent(cardContent.tags);
this._setMessagesContent(cardContent.messages);
/* Notify that this card (may have) changed size. */
this.dispatchEvent(new CustomEvent('iron-resize', { bubbles: true }));
if (!suppressResizeEvent) {
/* Notify that this card (may have) changed size. */
this.dispatchEvent(new CustomEvent('iron-resize', { bubbles: true }));
}
}
/* Update the conflict filter toggle state. */