mirror of
https://github.com/blasten/turn.js.git
synced 2025-04-06 03:57:41 +08:00
Fixed undefined errors on touch devices when touching outside of active corners.
Fixed bug in display=single (on touch devices) when on last page, was unable to turn to previous page.
This commit is contained in:
parent
dc7be695d0
commit
056e8f6174
5
turn.js
5
turn.js
@ -409,7 +409,7 @@ turnMethods = {
|
|||||||
data.pages[page] = data.pageObjs[page].
|
data.pages[page] = data.pageObjs[page].
|
||||||
css({width: (single) ? this.width() : this.width()/2, height: this.height()}).
|
css({width: (single) ? this.width() : this.width()/2, height: this.height()}).
|
||||||
flip({page: page,
|
flip({page: page,
|
||||||
next: (even || single) ? page+1 : page-1,
|
next: (single && page === data.totalPages) ? page -1 : ((even || single) ? page+1 : page-1),
|
||||||
turn: this,
|
turn: this,
|
||||||
duration: data.opts.duration,
|
duration: data.opts.duration,
|
||||||
acceleration : data.opts.acceleration,
|
acceleration : data.opts.acceleration,
|
||||||
@ -1232,6 +1232,9 @@ flipMethods = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_cornerActivated: function(e) {
|
_cornerActivated: function(e) {
|
||||||
|
if (e.originalEvent === undefined) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
e = (isTouch) ? e.originalEvent.touches : [e];
|
e = (isTouch) ? e.originalEvent.touches : [e];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user