| OLD | NEW |
| 1 SKY MODULE | 1 SKY MODULE |
| 2 <import src="sky:core" as="sky"/> | 2 <import src="sky:core" as="sky"/> |
| 3 <script> | 3 <script> |
| 4 // display: toolbar; | 4 // display: toolbar; |
| 5 // toolbar-spacing: <length> | 5 // toolbar-spacing: <length> |
| 6 // display: spring; // remaining space is split equally amongst the springs | 6 // display: spring; // remaining space is split equally amongst the springs |
| 7 // children are vertically centered, layout out left-to-right with toolbar-spac
ing space between them | 7 // children are vertically centered, layout out left-to-right with toolbar-spac
ing space between them |
| 8 // last child is hidden by default unless there's not enough room for the other
s, then it's shown last, right-aligned | 8 // last child is hidden by default unless there's not enough room for the other
s, then it's shown last, right-aligned |
| 9 module.exports.SpringLayoutManager = class SpringLayoutManager extends sky.Layo
utManager { } | 9 module.exports.SpringLayoutManager = class SpringLayoutManager extends sky.Layo
utManager { } |
| 10 sky.registerLayoutManager('spring', module.exports.SpringLayoutManager); | 10 sky.registerLayoutManager('spring', module.exports.SpringLayoutManager); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 function hitTest(x, y) { | 198 function hitTest(x, y) { |
| 199 let children = this.walkChildrenBackwards(); | 199 let children = this.walkChildrenBackwards(); |
| 200 let loop = children.next(); | 200 let loop = children.next(); |
| 201 while ((!loop.done) && (loop.value != this.firstSkippedChild)) | 201 while ((!loop.done) && (loop.value != this.firstSkippedChild)) |
| 202 if (this.inChild(loop.value, x, y)) | 202 if (this.inChild(loop.value, x, y)) |
| 203 return loop.value; | 203 return loop.value; |
| 204 if (this.showingOverflow) | 204 if (this.showingOverflow) |
| 205 if (this.inChild(this.overflowChild, x, y)) | 205 if (this.inChild(this.overflowChild, x, y)) |
| 206 return this.overflowChild; | 206 return this.overflowChild; |
| 207 return this.node; |
| 207 } | 208 } |
| 208 } | 209 } |
| 209 sky.registerLayoutManager('toolbar', module.exports.ToolbarLayoutManager); | 210 sky.registerLayoutManager('toolbar', module.exports.ToolbarLayoutManager); |
| 210 </script> | 211 </script> |
| OLD | NEW |