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

Side by Side Diff: sky/examples/style/hex-layout.sky

Issue 732243002: Specs: Define when needsLayout is reset (also, some unrelated markdown fixes) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « sky/examples/style/block-layout.sky ('k') | sky/examples/style/toolbar-layout.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:sky 1 #!mojo mojo:sky
2 <import src="sky:core" as="sky"/> 2 <import src="sky:core" as="sky"/>
3 <script> 3 <script>
4 class BeehiveLayoutManager extends sky.LayoutManager { 4 class BeehiveLayoutManager extends sky.LayoutManager {
5 function layout(width, height) { 5 function layout(width, height) {
6 this.markAsLaidOut();
6 if (width == null) 7 if (width == null)
7 width = this.getIntrinsicWidth().value; 8 width = this.getIntrinsicWidth().value;
8 let autoHeight = false; 9 let autoHeight = false;
9 if (height == null) { 10 if (height == null) {
10 height = 0; 11 height = 0;
11 autoHeight = true; 12 autoHeight = true;
12 } 13 }
13 this.assumeDimensions(width, height); 14 this.assumeDimensions(width, height);
14 let cellCount = this.node.getProperty('beehive-count'); 15 let cellCount = this.node.getProperty('beehive-count');
15 let cellDim = width / cellCount; 16 let cellDim = width / cellCount;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 div { display: beehive; beehive-count: 3; } 169 div { display: beehive; beehive-count: 3; }
169 </style> 170 </style>
170 <div> 171 <div>
171 <t>Hello</t> 172 <t>Hello</t>
172 <t>World</t> 173 <t>World</t>
173 <t>How</t> 174 <t>How</t>
174 <t>Are</t> 175 <t>Are</t>
175 <t>You</t> 176 <t>You</t>
176 <t>Today?</t> 177 <t>Today?</t>
177 </div> 178 </div>
OLDNEW
« no previous file with comments | « sky/examples/style/block-layout.sky ('k') | sky/examples/style/toolbar-layout.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698