|
1 | 1 | <h3>Scroll Position</h3>
|
2 |
| -<button {{action 'makeSquare'}}>Square</button> |
3 |
| -<button {{action 'makeRow'}}>Row</button> |
4 |
| -<button {{action 'makeLongRect'}}>Long Rectangle</button> |
5 |
| -<button {{action 'makeTallRect'}}>Tall Rectable</button> |
| 2 | +<button {{action 'toggleLayout'}}> |
| 3 | + {{#if showLayout}} |
| 4 | + Hide Custom Layout Template |
| 5 | + {{else}} |
| 6 | + Show Custom Layout Template |
| 7 | + {{/if}} |
| 8 | +</button> |
| 9 | +<hr /> |
6 | 10 |
|
7 |
| - <p> |
8 |
| - Container Width: <input type='range' min=200 max=600 value={{containerWidth}} oninput={{action 'updateContainerWidth' value='target.value'}}> {{containerWidth}} |
9 |
| - Container Height: <input type='range' min=200 max=1000 value={{containerHeight}} oninput={{action 'updateContainerHeight' value='target.value'}}> {{containerHeight}} |
| 11 | +<div class="items-sizes" style="margin-bottom:20px"> |
| 12 | + <button {{action 'makeSquare'}}>Square</button> |
| 13 | + <button {{action 'makeRow'}}>Row</button> |
| 14 | + <button {{action 'makeLongRect'}}>Long Rectangle</button> |
| 15 | + <button {{action 'makeTallRect'}}>Tall Rectable</button> |
| 16 | + <p style="margin-top:5px"> |
| 17 | + <b>Item Height:</b> {{itemHeight}} |
| 18 | + <b>Item Width:</b> {{itemWidth}} |
10 | 19 | </p>
|
11 |
| - <p> |
12 |
| - Item Height: {{itemHeight}} |
13 |
| - Item Width: {{itemWidth}} |
14 |
| - </p> |
15 |
| - <p> |
16 |
| - Scroll Left: {{input value=scrollLeft}} |
17 |
| - Scroll Top: {{input value=scrollTop}} |
18 |
| - </p> |
19 |
| - <p>Note: The usage of this component remembers its scroll position. Try it by navigating away from this route and then returning.</p> |
20 |
| - <hr /> |
| 20 | +</div> |
21 | 21 |
|
22 |
| -<div class="wrapper" style="box-sizing:border-box;"> |
23 |
| - <div class="simple-layout" style="float:left;width:40%;margin-top:-12px;padding-right:20px;"> |
24 |
| - {{highlight-js code=markdown lang="javascript"}} |
25 |
| - </div> |
26 |
| - <div class="simple-list" style={{{concat 'float:left;width:60%;position:relative;width:' containerWidth 'px;height:' containerHeight 'px;'}}}> |
| 22 | +<p> |
| 23 | + Container Width: {{containerWidth}} <input type='range' min=200 max=650 value={{containerWidth}} oninput={{action 'updateContainerWidth' value='target.value'}}> |
| 24 | + Container Height: {{containerHeight}} <input type='range' min=200 max=1000 value={{containerHeight}} oninput={{action 'updateContainerHeight' value='target.value'}}> |
| 25 | +</p> |
| 26 | + |
| 27 | +<p> |
| 28 | + Scroll Left: {{input value=scrollLeft}} |
| 29 | + Scroll Top: {{input value=scrollTop}} |
| 30 | +</p> |
| 31 | +<p>Note: The usage of this component remembers its scroll position. Try it by navigating away from this route and then returning.</p> |
| 32 | +<hr /> |
| 33 | + |
| 34 | +<div class="simple-wrapper" style="box-sizing:border-box;width:100%;"> |
| 35 | + {{#if showLayout}} |
| 36 | + <div class="simple-layout" style="float:left;width:40%;margin-top:-12px;padding-right:20px;"> |
| 37 | + {{highlight-js code=markdown lang="javascript"}} |
| 38 | + </div> |
| 39 | + {{/if}} |
| 40 | + <div class="simple-list" style={{{concat 'float:left;position:relative;width:' containerWidth 'px;height:' containerHeight 'px;'}}}> |
27 | 41 | {{#ember-collection
|
28 | 42 | items=model
|
29 | 43 | estimated-height=containerHeight
|
|
39 | 53 | </div>
|
40 | 54 | {{/ember-collection}}
|
41 | 55 | </div>
|
42 |
| - |
43 | 56 | </div>
|
0 commit comments