Testing new scroller view

This commit is contained in:
Max Lynch
2013-10-24 12:45:13 -05:00
parent b2b30f0d9b
commit df29095ca7
4 changed files with 3570 additions and 17 deletions

1793
dist/js/ionic.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,16 @@
(function(ionic) {
'use strict';
ionic.views.Scroll = function(opts) {
/**
* The Scroll view is a container that suppoerts complex
* and customizable scroll behavior.
*
* This is a replacement for the buggy and shallow -webkit-overflow-scroll: touch.
* which is fine for web apps that want to have overflow scrolling containers,
* but HTML5 hybrid apps benefit from the same kind of scroll abstractions
* seen on iOS or Android.
*/
ionic.views.ScrollView = function(opts) {
var _this = this;
// Extend the options with our defaults
@ -10,15 +19,11 @@
dragThresholdY: 10,
resistance: 2,
scrollEventName: 'momentumScrolled',
intertialEventInterval: 50
intertialEventInterval: 50,
showScrollBar: true
});
this.el = opts.el;
this.decelerationRate = opts.decelerationRate;
this.dragThresholdY = opts.dragThresholdY;
this.resistance = opts.resistance;
this.scrollEventName = opts.scrollEventName;
this.inertialEventInterval = opts.inertialEventInterval;
ionic.Utils.extend(this, opts);
// Listen for drag and release events
ionic.onGesture('drag', function(e) {

1771
js/views/scrollerView.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
<a href="#" class="button button-danger button-clear">Delete</a>
</div>
<div id="scroller" class="scroll" style="margin-top:44px">
<!--<div id="filler" style="height: 1400px; background: url('tree_bark.png') repeat;"></div>-->
<div id="filler" style="height: 1400px; background: url('tree_bark.png') repeat;"></div>
<ul class="list">
</ul>
</div>