Update annotations

This commit is contained in:
Insality
2024-10-15 19:43:36 +03:00
parent 5848921cba
commit ea80c874f6
8 changed files with 170 additions and 65 deletions

View File

@@ -115,9 +115,8 @@ end
--- Add element to DataList. Currenly untested
-- @tparam DataList self @{DataList}
-- @tparam table data
-- @tparam number index
-- @tparam number shift_policy The constant from const.SHIFT.*
-- @local
-- @tparam number|nil index
-- @tparam number|nil shift_policy The constant from const.SHIFT.*
function DataList.add(self, data, index, shift_policy)
index = index or #self._data + 1
shift_policy = shift_policy or const.SHIFT.RIGHT
@@ -129,9 +128,8 @@ end
--- Remove element from DataList. Currenly untested
-- @tparam DataList self @{DataList}
-- @tparam number index
-- @tparam number shift_policy The constant from const.SHIFT.*
-- @local
-- @tparam number|nil index
-- @tparam number|nil shift_policy The constant from const.SHIFT.*
function DataList.remove(self, index, shift_policy)
helper.remove_with_shift(self._data, index, shift_policy)
self:_refresh()
@@ -140,9 +138,8 @@ end
--- Remove element from DataList by data value. Currenly untested
-- @tparam DataList self @{DataList}
-- @tparam tabe data
-- @tparam number shift_policy The constant from const.SHIFT.*
-- @local
-- @tparam table data
-- @tparam number|nil shift_policy The constant from const.SHIFT.*
function DataList.remove_by_data(self, data, shift_policy)
local index = helper.contains(self._data, data)
if index then

View File

@@ -297,9 +297,9 @@ function M.clear_layout(self)
end
-- @private
-- @tparam node node
-- @treturn number, number
-- @local
function M.get_node_size(node)
if not gui.is_enabled(node, false) then
return 0, 0
@@ -318,10 +318,10 @@ function M.get_node_size(node)
end
-- @private
-- @tparam Layout self @{Layout}
-- Calculate rows data for layout. Contains total width, height and rows info (width, height, count of elements in row)
-- @treturn druid.layout.rows_data
-- @local
function M.calculate_rows_data(self)
local entities = self.entities
local margin = self.margin
@@ -401,11 +401,11 @@ function M.calculate_rows_data(self)
return rows_data
end
-- @private
-- @tparam node node
-- @tparam number x
-- @tparam number y
-- @treturn node
-- @local
function M:set_node_position(node, x, y)
local position = gui.get_position(node)
position.x = x