|
5 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6 | 6 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
7 | 7 | <link rel="stylesheet" href="../../../demo/demo.css"/>
|
8 |
| - <!-- <script src="https://cdn.jsdelivr.net/npm/gridstack@3.3.0/dist/gridstack-h5.js"></script> --> |
9 | 8 | <script src="../../../dist/gridstack-h5.js"></script>
|
10 | 9 | <style>
|
11 | 10 | .topHeader {
|
|
30 | 29 | width: 50px;
|
31 | 30 | box-sizing: border-box;
|
32 | 31 | }
|
| 32 | + .outer { |
| 33 | + display: flex; |
| 34 | + } |
| 35 | + .main { |
| 36 | + flex-grow: 1; |
| 37 | + } |
| 38 | + .bodyScroll { |
| 39 | + height: 2000px; |
| 40 | + width: 100px; |
| 41 | + flex: 0 0 auto; |
| 42 | + border: 3px solid blue; |
| 43 | + } |
33 | 44 | </style>
|
34 | 45 |
|
35 | 46 | </head>
|
36 | 47 | <body>
|
37 |
| - <div class="topHeader">This is the header which brings an offset of 200 px</div> |
38 |
| - <div class="row"> |
39 |
| - <div class="showDistance"></div> |
40 |
| - <div class="willScroll"> |
41 |
| - <div class="grid-stack"></div> |
42 |
| - </div> |
| 48 | + <div class="outer"> |
| 49 | + <div class="main"> |
| 50 | + <div class="topHeader"> |
| 51 | + This page allows to test scrolling behavior when scroll element is not whole page (html element), |
| 52 | + and when the scrolling element is not at the top of the page. Also effects of multiple |
| 53 | + scrollbars can be tested, as the html element also can be scrolled.<br> |
| 54 | + This is the header which brings an offset of 200 px</div> |
| 55 | + <div class="row"> |
| 56 | + <div class="showDistance"></div> |
| 57 | + <div class="willScroll"> |
| 58 | + <div class="grid-stack"></div> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + <div class="bodyScroll">This causes the scrollbar on html element</div> |
43 | 63 | </div>
|
44 | 64 |
|
45 | 65 | <script type="text/javascript">
|
|
48 | 68 | {x: 0, y: 0, w: 2, h: 2, content: "resize-me - check scrolling starts only when in height of gray area, and you can scroll back up as well."},
|
49 | 69 | {x: 3, y: 0, w: 2, h: 2, content: "this is here to have next item positioned way down"},
|
50 | 70 | {x: 3, y: 2, w: 3, h: 2, content: "resize me - scroll will start immediately, but should not be extremely fast"},
|
51 |
| - {x: 6, y: 0, w: 2, h: 8, content: "this is here to have a scroll bar from the beginning"}, |
| 71 | + {x: 6, y: 0, w: 2, h: 8, content: "this is here to have a scroll bar on .main div from the beginning"}, |
52 | 72 | ];
|
53 | 73 | grid.load(items);
|
54 | 74 | </script>
|
|
0 commit comments