mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
#144 Add checks for is scroll available to check POI in that intertion side
This commit is contained in:
parent
ba312742d2
commit
d24301cd13
@ -247,4 +247,5 @@ Have a good day.
|
|||||||
- The `check_function` should return _true_ of _false_. If true - button can be clicked
|
- The `check_function` should return _true_ of _false_. If true - button can be clicked
|
||||||
- The `failure_callback`will be called if `check_function` will return false. It's callback for you if button is not available
|
- The `failure_callback`will be called if `check_function` will return false. It's callback for you if button is not available
|
||||||
- Example with `set_check_function` exists in general:buttons example collection
|
- Example with `set_check_function` exists in general:buttons example collection
|
||||||
- **#107** Better scale text adjust by height for multiline text nodes (but still not perfect)
|
- **#107** Better scale text adjust by height for multiline text nodes (but still not perfect)
|
||||||
|
- **#144** Fix some glitches with scroll Points of Interest. Remove false detection of scroll stopped.
|
@ -614,11 +614,11 @@ end
|
|||||||
function Scroll._check_threshold(self)
|
function Scroll._check_threshold(self)
|
||||||
local is_stopped = false
|
local is_stopped = false
|
||||||
|
|
||||||
if math.abs(self.inertion.x) < self.style.INERT_THRESHOLD then
|
if self.drag.can_x and 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 math.abs(self.inertion.y) < self.style.INERT_THRESHOLD then
|
if self.drag.can_y and 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