mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Merge branch 'develop' into 43-infinity-scroll
This commit is contained in:
@@ -54,11 +54,10 @@
|
||||
|
||||
|
||||
local Event = require("druid.event")
|
||||
local const = require("druid.const")
|
||||
local helper = require("druid.helper")
|
||||
local component = require("druid.component")
|
||||
|
||||
local Scroll = component.create("scroll", { const.ON_UPDATE, const.ON_LAYOUT_CHANGE })
|
||||
local Scroll = component.create("scroll", { component.ON_UPDATE, component.ON_LAYOUT_CHANGE })
|
||||
|
||||
|
||||
local function inverse_lerp(min, max, current)
|
||||
@@ -414,6 +413,15 @@ function Scroll.bind_grid(self, grid)
|
||||
end
|
||||
|
||||
|
||||
--- Strict drag scroll area. Useful for
|
||||
-- restrict events outside stencil node
|
||||
-- @tparam Drag self
|
||||
-- @tparam node node Gui node
|
||||
function Scroll.set_click_zone(self, node)
|
||||
self.drag:set_click_zone(node)
|
||||
end
|
||||
|
||||
|
||||
function Scroll._on_scroll_drag(self, dx, dy)
|
||||
local t = self.target_position
|
||||
local b = self.available_pos
|
||||
|
Reference in New Issue
Block a user