Added init fix and small markdown changes

This commit is contained in:
Robert Jelic
2025-04-08 01:30:18 +02:00
parent ff9ffb76aa
commit 4b4b2e3ca7
5 changed files with 28 additions and 7 deletions

View File

@@ -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)