fix two finger pan gestures detection

This is a stupid bug I introduced when I thought 0 evaluated to be false.
Actually in Lua only explicit `false` and `nil` are evaluated to `false`
all other values are true in logical expressions.

This should also fix #546. Probably because the touch screens in Kindle
are not as sensitive as in Kobo, this problem is not discovered early
util I play with multi-touch on a Android phone which has a sensitive
enough screen to expose this bug.
pull/633/head
chrox 10 years ago
parent 82347955c4
commit 6f99e96e49

@ -460,7 +460,7 @@ function GestureDetector:handleTwoFingerPan(tev)
-- triggering slot
local tslot = tev.slot
-- reference slot
local rslot = tslot and 0 or 1
local rslot = tslot == 1 and 0 or 1
local tpan_dir, tpan_dis = self:getPath(tslot)
local tstart_pos = Geom:new{
x = self.first_tevs[tslot].x,

@ -1 +1 @@
Subproject commit 0047fa7aa34f686641abfa3db7e11217d2315137
Subproject commit 2b38b16d2795a228b1a541fbc2e09bd093119aad
Loading…
Cancel
Save