watrboy00
8 Jun 2010, 1:48 PM
Using this example...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Scroller</title>
<link rel="stylesheet" href="../../resources/css/ext-touch.css" type="text/css" />
<style type="text/css">
#content
{
height:500px;
width:500px;
}
</style>
<script type="text/javascript" src="../../ext-touch-debug.js"></script>
<script language="javascript" type="text/javascript">
Ext.setup({
onReady: function() {
var config = {
bounces: false,
momentum: false,
horizontal: true,
scrollbars: true,
vertical: false
},
el = Ext.fly('content'),
scroller = new Ext.util.Scroller(el, config);
Ext.util.Observable.capture(scroller, function() {
console.log( arguments );
});
}
});
</script>
</head>
<body></body>
</html>
will generate the following output by touching and dragging your cursor across the screen:
["touchstart", Object { event=Object, more...}, Object { bounces=false, more...}]
["scrollstart", Object { event=Object, more...}, Object { bounces=false, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["touchend", Object { event=Object, more...}, Object { bounces=false, more...}]
["scrollend", Object { bounces=false, more...}]
Seems like 'touchend' should come after 'scrollend'. Any thoughts as to why it was setup like this?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Scroller</title>
<link rel="stylesheet" href="../../resources/css/ext-touch.css" type="text/css" />
<style type="text/css">
#content
{
height:500px;
width:500px;
}
</style>
<script type="text/javascript" src="../../ext-touch-debug.js"></script>
<script language="javascript" type="text/javascript">
Ext.setup({
onReady: function() {
var config = {
bounces: false,
momentum: false,
horizontal: true,
scrollbars: true,
vertical: false
},
el = Ext.fly('content'),
scroller = new Ext.util.Scroller(el, config);
Ext.util.Observable.capture(scroller, function() {
console.log( arguments );
});
}
});
</script>
</head>
<body></body>
</html>
will generate the following output by touching and dragging your cursor across the screen:
["touchstart", Object { event=Object, more...}, Object { bounces=false, more...}]
["scrollstart", Object { event=Object, more...}, Object { bounces=false, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["scroll", Object { bounces=false, more...}, Object { x=0, more...}]
["touchend", Object { event=Object, more...}, Object { bounces=false, more...}]
["scrollend", Object { bounces=false, more...}]
Seems like 'touchend' should come after 'scrollend'. Any thoughts as to why it was setup like this?