import{_ as r,a as t,b as a,ag as o}from"./chunks/framework.BcrMLAmg.js";const h=JSON.parse('{"title":"PropertySystem","description":"","frontmatter":{},"headers":[],"relativePath":"references/propertySystem.md","filePath":"references/propertySystem.md","lastUpdated":1757840145000}'),s={name:"references/propertySystem.md"};function l(n,e,p,d,i,m){return a(),t("div",null,e[0]||(e[0]=[o('
PropertySystem is a class that allows Elements to have properties that can be observed and updated.It also allows for properties to have custom getters and setters. This is the base system for all Elements.
| Method | Returns | Description |
|---|---|---|
| PropertySystem.addSetterHook | - | Adds a setter hook to the PropertySystem |
| PropertySystem.defineProperty | - | Defines a property for an element class |
| PropertySystem.combineProperties | - | Combines multiple properties |
| PropertySystem.blueprint | table | Creates a blueprint of an element class |
| PropertySystem.createFromBlueprint | table | Creates an element from a blueprint |
| PropertySystem:__init | table | Initializes the PropertySystem |
| PropertySystem:_updateProperty | table | Update call for a property |
| PropertySystem:observe | table | Observers a property |
| PropertySystem:removeObserver | table | Removes an observer from a property |
| PropertySystem:removeAllObservers | table | Removes all observers from a property |
| PropertySystem:instanceProperty | table | Adds a property to the PropertySystem on instance level |
| PropertySystem:removeProperty | table | Removes a property from the PropertySystem |
| PropertySystem:getPropertyConfig | table | Gets a property configuration |
Adds a setter hook to the PropertySystem. Setter hooks are functions that are called before a property is set.
hook function The hook function to addDefines a property for an element class
class table The element class to define the property forname string The name of the propertyconfig table The configuration of the propertyCombines multiple properties into a single getter and setter
class table The element class to combine the properties forname string The name of the combined propertyCreates a blueprint of an element class with all its properties
elementClass table The element class to create a blueprint fromtable blueprint A table containing all property definitionsCreates an element from a blueprint
elementClass table The element class to create from the blueprintblueprint table The blueprint to create the element fromtable element The created elementInitializes the PropertySystem IS USED INTERNALLY
table self The PropertySystemUpdate call for a property IS USED INTERNALLY
name string The name of the propertyvalue any The value of the propertytable self The PropertySystemObservers a property
name string The name of the propertycallback function The callback function to call when the property changestable self The PropertySystemRemoves an observer from a property
name string The name of the propertycallback function The callback function to removetable self The PropertySystemRemoves all observers from a property
name (optional) string The name of the propertytable self The PropertySystemAdds a property to the PropertySystem on instance level
name string The name of the propertyconfig table The configuration of the propertytable self The PropertySystemRemoves a property from the PropertySystem on instance level
name string The name of the propertytable self The PropertySystemGets a property configuration
name string The name of the propertytable config The configuration of the property