Merge pull request #633 from chrox/master

fix two finger pan gestures detection
This commit is contained in:
Qingping Hou
2014-06-07 13:19:11 -04:00
5 changed files with 5 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ local DEBUG = require("dbg")
-- lfs
local PluginLoader = {
plugin_path = lfs.currentdir().."/plugins"
plugin_path = "plugins"
}
function PluginLoader:loadPlugins()

View File

@@ -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,

View File

@@ -116,6 +116,7 @@ end
-- transmit an event to registered widgets
function UIManager:sendEvent(event)
if #self._window_stack == 0 then return end
-- top level widget has first access to the event
if self._window_stack[#self._window_stack].widget:handleEvent(event) then
return