Scroll size limit

This commit is contained in:
Max Lynch
2013-10-25 17:32:23 -05:00
parent a7c7fe1523
commit bb97ff065c
3 changed files with 50 additions and 16 deletions

View File

@@ -16,7 +16,7 @@
}
#wrapper {
position: relative;
height: 400px;
height: 100%;
overflow: hidden;
}
</style>
@@ -30,7 +30,7 @@
</div>
<div id="wrapper" style="margin-top: 44px">
<div id="scroller" class="scroll">
<div id="filler" style="width: 4400px; height: 1000px; background: url('tree_bark.png') repeat;"></div>
<div id="filler" style="width: 4400px; height: 6000px; background: url('tree_bark.png') repeat;"></div>
</div>
</div>
</section>
@@ -38,21 +38,23 @@
<script>
var s = document.getElementById('scroller');
var w = s.scrollWidth;
var w = s.scrollHeight;
for(var i = 0; i < w; i++) {
if((i % 500) === 0) {
var l = document.createElement('span');
l.innerText = i + 'px'
l.style.position = 'absolute';
l.style.left = i + 'px';
l.style.top = '20px';
l.style.left = '20px';
l.style.top = i + 'px';
s.appendChild(l);
}
}
var scroll = new ionic.views.Scroll({
var scroll = new ionic.views.ScrollView({
el: s,
isHorizontalEnabled: false,
isVerticalEnabled: true
});
</script>
</body>