#41 Add recursive component removing on druid:remove

This commit is contained in:
Insality
2020-05-08 00:12:48 +03:00
parent bb565432f3
commit 92f95f77d1
2 changed files with 24 additions and 0 deletions

View File

@@ -138,6 +138,22 @@ function Component.get_druid(self)
end
--- Return true, if current component is child of another component
-- @function component:is_child_of
-- @treturn bool True, if current component is child of another
function Component.is_child_of(self, component)
return self:get_context() == component
end
--- Return component name
-- @function component:get_name
-- @treturn string The component name
function Component.get_name(self)
return self._component.name
end
--- Setup component context and his style table
-- @function component:setup_component
-- @tparam druid_instance table The parent druid instance