Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: lib/src/iron-list/test/x-list.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/iron-list/test/smoke/avg-worst-case.html ('k') | lib/src/iron-media-query/iron-media-query.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « lib/src/iron-list/test/smoke/avg-worst-case.html ('k') | lib/src/iron-media-query/iron-media-query.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698