mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #389 from chrox/master
add PAN_THRESHOLD when detecting hold_pan gesture
This commit is contained in:
@@ -559,7 +559,8 @@ function GestureDetector:holdState(tev, hold)
|
||||
},
|
||||
time = tev.timev,
|
||||
}
|
||||
else
|
||||
elseif (tev.x and math.abs(tev.x - self.first_tevs[slot].x) >= self.PAN_THRESHOLD) or
|
||||
(tev.y and math.abs(tev.y - self.first_tevs[slot].y) >= self.PAN_THRESHOLD) then
|
||||
local ges_ev = self:handlePan(tev)
|
||||
if ges_ev ~= nil then ges_ev.ges = "hold_pan" end
|
||||
return ges_ev
|
||||
|
||||
Reference in New Issue
Block a user