Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
support declaratively setting layout via attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Jan 8, 2014
1 parent 5cb6aef commit e3e44f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion polymer-grid-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
nodes: null,
layout: null,
auto: false,
created: function() {
this.layout = [];
},
nodesChanged: function() {
this.invalidate();
},
Expand All @@ -28,7 +31,7 @@
);
},
invalidate: function() {
if (this.layout) {
if (this.layout && this.layout.length) {
// job debounces layout, only letting it occur every N ms
this.layoutJob = this.job(this.layoutJob, this.relayout);
}
Expand Down
2 changes: 1 addition & 1 deletion smoke.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
</style>
</head>
<body>
<body unresolved>
<grid-test></grid-test>

<polymer-element name="grid-test">
Expand Down

0 comments on commit e3e44f7

Please sign in to comment.