Added init fix and small markdown changes
This commit is contained in:
@@ -81,6 +81,10 @@ end
|
||||
--- @return table self The initialized instance
|
||||
--- @protected
|
||||
function BaseElement:init(props, basalt)
|
||||
if self._initialized then
|
||||
return self
|
||||
end
|
||||
self._initialized = true
|
||||
self._props = props
|
||||
self._values.id = uuid()
|
||||
self.basalt = basalt
|
||||
@@ -122,6 +126,10 @@ end
|
||||
--- @return table self The BaseElement instance
|
||||
--- @protected
|
||||
function BaseElement:postInit()
|
||||
if self._postInitialized then
|
||||
return self
|
||||
end
|
||||
self._postInitialized = true
|
||||
if(self._props)then
|
||||
for k,v in pairs(self._props)do
|
||||
self.set(k, v)
|
||||
|
||||
@@ -142,6 +142,7 @@ function Container:addChild(child)
|
||||
|
||||
table.insert(self._values.children, child)
|
||||
child.parent = self
|
||||
child:postInit()
|
||||
self.set("childrenSorted", false)
|
||||
self:registerChildrenEvents(child)
|
||||
return self
|
||||
|
||||
@@ -411,8 +411,6 @@ Animation.registerAnimation("scrollText", {
|
||||
end
|
||||
})
|
||||
|
||||
---@splitClass
|
||||
|
||||
--- Adds additional methods for VisualElement when adding animation plugin
|
||||
--- @class VisualElement
|
||||
local VisualElement = {hooks={}}
|
||||
|
||||
@@ -39,6 +39,8 @@ local themes = {
|
||||
default = defaultTheme
|
||||
}
|
||||
|
||||
---@title title
|
||||
|
||||
local currentTheme = "default"
|
||||
|
||||
--- This is the theme plugin. It provides a theming system that allows for consistent styling across elements
|
||||
|
||||
Reference in New Issue
Block a user