mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Documentation experiments
This commit is contained in:
@@ -9,26 +9,6 @@ local class = require("druid.system.middleclass")
|
||||
local Component = class("druid.component")
|
||||
|
||||
|
||||
--- Setup component context and his style table
|
||||
-- @function component:setup_component
|
||||
-- @tparam context table Druid context. Usually it is self of script
|
||||
-- @tparam style table Druid style module
|
||||
-- @treturn Component Component itself
|
||||
function Component.setup_component(self, context, style)
|
||||
self._meta = {
|
||||
template = nil,
|
||||
context = nil,
|
||||
nodes = nil,
|
||||
style = nil,
|
||||
}
|
||||
|
||||
self:set_context(context)
|
||||
self:set_style(style)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Get current component style table
|
||||
-- @function component:get_style
|
||||
-- @treturn table Component style table
|
||||
@@ -136,6 +116,26 @@ function Component.get_druid(self)
|
||||
end
|
||||
|
||||
|
||||
--- Setup component context and his style table
|
||||
-- @function component:setup_component
|
||||
-- @tparam context table Druid context. Usually it is self of script
|
||||
-- @tparam style table Druid style module
|
||||
-- @treturn Component Component itself
|
||||
function Component.setup_component(self, context, style)
|
||||
self._meta = {
|
||||
template = nil,
|
||||
context = nil,
|
||||
nodes = nil,
|
||||
style = nil,
|
||||
}
|
||||
|
||||
self:set_context(context)
|
||||
self:set_style(style)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Basic constructor of component. It will call automaticaly
|
||||
-- by `Component.static.create`
|
||||
-- @function component:initialize
|
||||
|
Reference in New Issue
Block a user