| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |