mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
Better on end touch events
This commit is contained in:
parent
7ac6c9b02b
commit
8a173305de
@ -71,8 +71,10 @@ local function end_touch(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.is_drag = false
|
self.is_drag = false
|
||||||
self.is_touch = false
|
if self.is_touch then
|
||||||
self.on_touch_end:trigger(self:get_context())
|
self.is_touch = false
|
||||||
|
self.on_touch_end:trigger(self:get_context())
|
||||||
|
end
|
||||||
self:reset_input_priority()
|
self:reset_input_priority()
|
||||||
self.touch_id = 0
|
self.touch_id = 0
|
||||||
end
|
end
|
||||||
|
@ -569,11 +569,11 @@ end
|
|||||||
function Scroll._check_threshold(self)
|
function Scroll._check_threshold(self)
|
||||||
local is_stopped = false
|
local is_stopped = false
|
||||||
|
|
||||||
if self.inertion.x ~= 0 and math.abs(self.inertion.x) < self.style.INERT_THRESHOLD then
|
if math.abs(self.inertion.x) < self.style.INERT_THRESHOLD then
|
||||||
is_stopped = true
|
is_stopped = true
|
||||||
self.inertion.x = 0
|
self.inertion.x = 0
|
||||||
end
|
end
|
||||||
if self.inertion.y ~= 0 and math.abs(self.inertion.y) < self.style.INERT_THRESHOLD then
|
if math.abs(self.inertion.y) < self.style.INERT_THRESHOLD then
|
||||||
is_stopped = true
|
is_stopped = true
|
||||||
self.inertion.y = 0
|
self.inertion.y = 0
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user