This commit is contained in:
Insality
2025-03-13 23:39:43 +02:00
parent c13a31711f
commit 1aa96d8dbc
29 changed files with 1278 additions and 291 deletions

View File

@@ -277,7 +277,7 @@ function M:update_view_size()
end
---Enable or disable scroll inert.
---Enable or disable scroll inert
-- If disabled, scroll through points (if exist)
-- If no points, just simple drag without inertion
---@param state boolean Inert scroll state
@@ -289,14 +289,14 @@ function M:set_inert(state)
end
---Return if scroll have inertion.
---@return boolean @If scroll have inertion
---Return if scroll have inertion
---@return boolean is_inert If scroll have inertion
function M:is_inert()
return self._is_inert
end
---Set extra size for scroll stretching.
---Set extra size for scroll stretching
-- Set 0 to disable stretching effect
---@param stretch_size number|nil Size in pixels of additional scroll area
---@return druid.scroll Current scroll instance

View File

@@ -72,7 +72,7 @@ end
local _temp_pos = vmath.vector3(0)
---Return pos for grid node index
---@param index number The grid element index
---@return vector3 @Node position
---@return vector3 position Node position
function M:get_pos(index)
local row = math.ceil(index / self.in_row) - 1
local col = (index - row * self.in_row) - 1
@@ -191,7 +191,7 @@ end
---Set new items to the grid. All previous items will be removed
---@param nodes node[] The new grid nodes
-- @tparam[opt=false] boolean is_instant If true, update node positions instantly
---@param is_instant boolean|nil If true, update node positions instantly
function M:set_items(nodes, is_instant)
self.nodes = nodes
for index = 1, #nodes do
@@ -340,8 +340,8 @@ end
---Set new node size for grid
-- @tparam[opt] number width The new node width
-- @tparam[opt] number height The new node height
---@param width number|nil The new node width
---@param height number|nil The new node height
---@return druid.grid Current grid instance
function M:set_item_size(width, height)
if width then