Fix card size calculation stacks (#1375)

This commit is contained in:
Paulus Schoutsen 2018-07-01 12:25:28 -04:00 committed by GitHub
parent dc5213a79a
commit 76256699e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,6 +132,11 @@ class HUIView extends PolymerElement {
}
elements.forEach((el) => {
// Trigger custom elements to build up DOM. This is needed for some elements
// that use the DOM to decide their height. We don't have to clean this up
// because a DOM element can only be in 1 position, so it will be removed from
// 'this' and added to the correct column afterwards.
this.appendChild(el);
const cardSize = typeof el.getCardSize === 'function' ? el.getCardSize() : 1;
columns[getColumnIndex(cardSize)].push(el);
});