doing magic testing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-23 00:03:50 +04:00
parent 9a37cadb1e
commit b45f9996d0
3 changed files with 15 additions and 3 deletions

View File

@ -404,6 +404,7 @@ iScroll.prototype = {
if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e);
/*
// XXX do we need this?
if (that.zoomed) {
scale = that.scale * that.lastScale;
@ -424,6 +425,7 @@ iScroll.prototype = {
if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
return;
}
*/
if (!that.moved) {
if (hasTouch) {

View File

@ -133,9 +133,10 @@ $(document).ready(function(){
$('.viewer')
.on('scrollCancelled', function(){ setCurrentPage() })
//.on('shortClick', handleClick)
.on('swipeLeft', handleSwipeLeft)
.on('swipeRight', handleSwipeRight)
.on('screenReleased', handleScrollRelease)
//.on('swipeLeft', handleSwipeLeft)
//.on('swipeRight', handleSwipeRight)
//.on('screenReleased', handleScrollRelease)
.on('screenReleased swipeRight swipeLeft', handleScrollRelease)
/*
// try a way of cheating...

View File

@ -77,6 +77,13 @@ function makeSwipeHandler(action){
return function(evt, data){
// ribbon mode...
if(isNavigationViewRelative()){
// this makes things snap...
if(SNAP_TO_PAGES_IN_RIBBON){
setCurrentPage()
return
}
return handleScrollRelease(evt, data)
}
// full page view...
@ -95,11 +102,13 @@ var handleSwipeRight = makeSwipeHandler(nextPage)
// explicitly bind them...
// XXX restore all the changed values...
function handleScrollRelease(evt, data){
/*
// this makes things snap...
if(SNAP_TO_PAGES_IN_RIBBON || !isNavigationViewRelative()){
setCurrentPage()
return
}
*/
var speed = data.speed.x
var pages = $('.page')