Merge branch 'gh-pages' of https://github.com/Pyroxenium/Basalt2 into gh-pages
This commit is contained in:
@@ -30,6 +30,7 @@ Extends: `PropertySystem`
|
|||||||
|[BaseElement:getCurrentState](#baseelement-getcurrentstate)|string|nil|Gets current primary state|
|
|[BaseElement:getCurrentState](#baseelement-getcurrentstate)|string|nil|Gets current primary state|
|
||||||
|[BaseElement:getActiveStates](#baseelement-getactivestates)|table|Gets all active states|
|
|[BaseElement:getActiveStates](#baseelement-getactivestates)|table|Gets all active states|
|
||||||
|[BaseElement:updateConditionalStates](#baseelement-updateconditionalstates)|BaseElement|Updates conditional states|
|
|[BaseElement:updateConditionalStates](#baseelement-updateconditionalstates)|BaseElement|Updates conditional states|
|
||||||
|
|[BaseElement:registerResponsiveState](#baseelement-registerresponsivestate-statename-condition-options)|BaseElement|Registers a state that responds to parent dimensions|
|
||||||
|[BaseElement:unregisterState](#baseelement-unregisterstate-statename)|BaseElement|Removes state definition|
|
|[BaseElement:unregisterState](#baseelement-unregisterstate-statename)|BaseElement|Removes state definition|
|
||||||
|[BaseElement:fireEvent](#baseelement-fireevent-event-any)|table|Triggers event callbacks with provided arguments|
|
|[BaseElement:fireEvent](#baseelement-fireevent-event-any)|table|Triggers event callbacks with provided arguments|
|
||||||
|[BaseElement:onChange](#baseelement-onchange-property-callback)|table|Watches property changes with callback notification|
|
|[BaseElement:onChange](#baseelement-onchange-property-callback)|table|Watches property changes with callback notification|
|
||||||
@@ -151,6 +152,18 @@ Updates all states that have auto-conditions
|
|||||||
### Returns
|
### Returns
|
||||||
* `BaseElement` self
|
* `BaseElement` self
|
||||||
|
|
||||||
|
## BaseElement:registerResponsiveState(stateName, condition, options?)
|
||||||
|
|
||||||
|
Registers a responsive state that reacts to parent size changes
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `stateName` `string` The name of the state
|
||||||
|
* `condition` `string|function` Condition as string expression or function: function(element) return boolean end
|
||||||
|
* `options` *(optional)* `table|number` Options table with 'priority' and 'observe', or just priority number
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `BaseElement` self
|
||||||
|
|
||||||
## BaseElement:unregisterState(stateName)
|
## BaseElement:unregisterState(stateName)
|
||||||
|
|
||||||
Removes a state from the registry
|
Removes a state from the registry
|
||||||
|
|||||||
18
docs/references/plugins/responsive.md
Normal file
18
docs/references/plugins/responsive.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# BaseElement
|
||||||
|
_This is the responsive plugin. It provides a fluent builder API for creating responsive states with an intuitive when/apply/otherwise syntax._
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
|
||||||
|
|Method|Returns|Description|
|
||||||
|
|---|---|---|
|
||||||
|
|[BaseElement:responsive](#baseelement-responsive-self)|ResponsiveBuilder|Creates a responsive state builder|
|
||||||
|
|
||||||
|
## BaseElement:responsive(self)
|
||||||
|
|
||||||
|
Creates a responsive builder for defining responsive states
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
* `self` `BaseElement` The element to create the builder for
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `ResponsiveBuilder` `builder` The responsive builder instance
|
||||||
Reference in New Issue
Block a user