Skip to content

Commit

Permalink
Improve layout widget references in parallax demo
Browse files Browse the repository at this point in the history
Use the selector API to prevent having to set layout data after the
referenced widget has been created, which was not intuitive.

Change-Id: Ifb39c405e842667c37eda97154f1bfc90dc03486
  • Loading branch information
cpetrov authored and Gerrit Code Review committed Feb 13, 2015
1 parent 0cb7384 commit 3cc65d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/parallax/parallax.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var imageTextView = tabris.create("ImageView", {
}).appendTo(scrollComposite);

var contentComposite = tabris.create("Composite", {
layoutData: {left: 0, right: 0, top: ["#titleComposite", 0], height: 1000},
background: "white"
}).appendTo(scrollComposite);

Expand All @@ -39,11 +40,10 @@ tabris.create("TextView", {
}).appendTo(contentComposite);

var titleComposite = tabris.create("Composite", {
id: "titleComposite",
background: "rgba(255,152,0,0.9)"
}).appendTo(scrollComposite);

contentComposite.set("layoutData", {left: 0, right: 0, top: [titleComposite, 0], height: 1000});

tabris.create("TextView", {
markupEnabled: true,
text: "<b>The perfect side dish</b>",
Expand Down

0 comments on commit 3cc65d4

Please sign in to comment.