mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
use two finger swipe gesture to return to original page in flipping mode
This commit is contained in:
@@ -89,6 +89,16 @@ function ReaderPaging:initGesListener()
|
||||
}
|
||||
}
|
||||
},
|
||||
TwoFingerSwipe = {
|
||||
GestureRange:new{
|
||||
ges = "two_finger_swipe",
|
||||
range = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight(),
|
||||
}
|
||||
}
|
||||
},
|
||||
Pan = {
|
||||
GestureRange:new{
|
||||
ges = "pan",
|
||||
@@ -179,9 +189,6 @@ function ReaderPaging:onSwipe(arg, ges)
|
||||
if self.flipping_mode then
|
||||
self:flipping(self.flipping_page, ges)
|
||||
self:updateFlippingPage(self.current_page)
|
||||
elseif self.original_page then
|
||||
self:gotoPage(self.original_page)
|
||||
self:updateOriginalPage(nil)
|
||||
elseif ges.direction == "left" or ges.direction == "up" then
|
||||
self:onPagingRel(1)
|
||||
elseif ges.direction == "right" or ges.direction == "down" then
|
||||
@@ -190,6 +197,12 @@ function ReaderPaging:onSwipe(arg, ges)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderPaging:onTwoFingerSwipe(arg, ges)
|
||||
if self.original_page then
|
||||
self:gotoPage(self.original_page)
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderPaging:onPan(arg, ges)
|
||||
if self.flipping_mode then
|
||||
self:flipping(self.flipping_page, ges)
|
||||
|
||||
Reference in New Issue
Block a user