Index: lib/src/iron-list/test/x-list.html |
diff --git a/lib/src/iron-list/test/x-list.html b/lib/src/iron-list/test/x-list.html |
index b68e3c618ef5b959cf3f3649038a7c168baed4c0..e38ce2507deff62146d5bdbe0ea6c0f3c4912b35 100644 |
--- a/lib/src/iron-list/test/x-list.html |
+++ b/lib/src/iron-list/test/x-list.html |
@@ -39,7 +39,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
<iron-list style$="[[_computedListHeight(listHeight)]]" items="[[data]]" as="item" id="list"> |
<template> |
<div class="item"> |
- <div style$="[[_computedItemHeight()]]">[[item.index]]</div> |
+ <div style$="[[_computedItemHeight(item)]]">[[item.index]]</div> |
</div> |
</template> |
</iron-list> |
@@ -64,6 +64,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
listHeight: { |
type: Number, |
value: 300 |
+ }, |
+ |
+ pre: { |
+ type: Boolean |
} |
}, |
@@ -71,12 +75,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
return this.$.list; |
}, |
- _computedItemHeight: function() { |
- return 'height: ' + (this.itemHeight) + 'px'; |
+ _computedItemHeight: function(item) { |
+ var css = this.pre ? 'white-space:pre;' : ''; |
+ if (item.height) { |
+ css += this.itemHeight === 0 ? '' : 'height: ' + (item.height) + 'px;'; |
+ } else if (this.itemHeight) { |
+ css += 'height: ' + (this.itemHeight) + 'px;'; |
+ } |
+ return css; |
}, |
_computedListHeight: function(listHeight) { |
return 'height: ' + (listHeight) + 'px'; |
- }, |
+ } |
}); |
</script> |