mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
record multiple slots for multi-touch input
for now, only slot 0 is parsed, the rest are ignored.
This commit is contained in:
@@ -74,6 +74,10 @@ GestureDetector = {
|
||||
}
|
||||
|
||||
function GestureDetector:feedEvent(tev)
|
||||
-- for now, only handle single point touch
|
||||
if tev.slot ~= 0 then
|
||||
return nil
|
||||
end
|
||||
re = self.state(self, tev)
|
||||
if tev.id ~= -1 then
|
||||
self.last_tev = tev
|
||||
@@ -260,6 +264,7 @@ function GestureDetector:panState(tev)
|
||||
-- end of pan, signal swipe gesture if necessary
|
||||
swipe_direct = self:isSwipe()
|
||||
if swipe_direct then
|
||||
DEBUG("swipe detected!")
|
||||
local start_pos = Geom:new{
|
||||
x = self.first_tev.x,
|
||||
y = self.first_tev.y,
|
||||
|
||||
Reference in New Issue
Block a user