Creates a new Overlay.
The arguments.
Gets the align-items CSS property.
Sets the align-items CSS property.
Gets the align-self CSS property.
Sets the align-self CSS property.
Gets the Binding object for the element.
Sets the Binding object for the element.
Get the DOMTokenList
of the underlying DOM element. This is essentially a shortcut to
element.dom.classList
.
Gets whether the overlay can be hidden by clicking on it.
Sets whether the overlay can be hidden by clicking on it.
Gets the root DOM node for this Element.
Gets the internal DOM element used as a the container of all children.
Sets the internal DOM element used as a the container of all children. Can be overridden by derived classes.
Gets whether the Element or its parent chain is enabled or not.
Sets whether the Element or its parent chain is enabled or not. Defaults to true
.
Gets whether the Element is in an error state.
Sets whether the Element is in an error state.
Gets whether the Element supports flex layout.
Sets whether the Element supports flex layout.
Gets the flex-basis CSS property.
Sets the flex-basis CSS property.
Gets the flex-direction CSS property.
Sets the flex-direction CSS property.
Gets the flex-grow CSS property.
Sets the flex-grow CSS property.
Gets the flex-shrink CSS property.
Sets the flex-shrink CSS property.
Gets the flex-wrap CSS property.
Sets the flex-wrap CSS property.
Gets whether the Element supports the grid layout.
Sets whether the Element supports the grid layout.
Gets the height of the Element in pixels.
Sets the height of the Element in pixels. Can also be an empty string to remove it.
Gets whether the Element is hidden.
Sets whether the Element is hidden.
Gets whether the Element is hidden all the way up to the root. If the Element itself or any of its parents are hidden then this is true.
Gets whether the Element will ignore parent events & variable states.
Sets whether the Element will ignore parent events & variable states.
Gets the justify-content CSS property.
Sets the justify-content CSS property.
Gets the justify-self CSS property.
Sets the justify-self CSS property.
Gets whether the Element is read only.
Sets whether the Element is read only.
Gets whether the Element is resizable and where the resize handle is located.
Sets whether the Element is resizable and where the resize handle is located. Can be one of 'top', 'bottom', 'right', 'left'. Set to null to disable resizing.
Gets the maximum size the Element can take when resized in pixels.
Sets the maximum size the Element can take when resized in pixels.
Gets the minimum size the Element can take when resized in pixels.
Sets the minimum size the Element can take when resized in pixels.
Gets whether the Element should be scrollable.
Sets whether the Element should be scrollable.
Shortcut to Element.dom.style.
Gets the tabIndex of the Element.
Sets the tabIndex of the Element.
Gets whether the overlay is transparent or not.
Sets whether the overlay is transparent or not.
Gets the width of the Element in pixels.
Sets the width of the Element in pixels. Can also be an empty string to remove it.
Protected
_buildIf the current node contains a root, recursively append its children to this node and return it. Otherwise return the current node. Also add each child to the parent under its keyed name.
The current element in the dom structure which must be recursively traversed and appended to its parent.
Optional
children?: anyThe children of the root node.
Optional
root?: anyThe root node of the dom structure.
The recursively appended element node.
Takes an array of pcui elements, each of which can contain their own child elements, and appends them to this container. These child elements are traversed recursively using _buildDomNode.
An array of child pcui elements to append to this container.
Links the specified observers and paths to the Element's data binding.
An array of observers or a single observer.
A path for the observer(s) or an array of paths that maps to each separate observer.
Moves the specified child at the specified index.
The element to move.
The index to move the element to.
Removes the specified child element from the container.
The element to remove.
Unbinds an event listener for the specified event name. If a callback function is provided, only that specific listener is removed. If no callback is provided, all listeners for the event are removed. If no event name is provided, all listeners for all events are removed.
Optional
name: stringThe name of the event to unbind. If not provided, all events are unbound.
Optional
fn: HandleEventThe specific callback function to remove. If not provided, all listeners for the event are removed.
The current instance for chaining.
// Register an event listener
const callback = (arg1, arg2) => {
console.log('Event triggered with arguments:', arg1, arg2);
};
events.on('testEvent', callback);
// Unbind the specific event listener
events.unbind('testEvent', callback);
// Unbind all listeners for a specific event
events.unbind('testEvent');
// Unbind all listeners for all events
events.unbind();
Static
createCreates a new Element of the desired type.
The type of the Element (registered by Element#register).
Arguments for the Element.
The new Element or undefined if type is not found.
Static
registerThe type we want to reference this Element by.
The actual class of the Element.
Optional
defaultArguments: anyDefault arguments when creating this type.
Static
unregisterStatic
Readonly
EVENT_Fired when a child Element gets added to the Container.
Static
Readonly
EVENT_Fired when the mouse is clicked on the Element but only if the Element is enabled. The native DOM MouseEvent is passed as a parameter to the event handler.
Static
Readonly
EVENT_Fired after the element has been destroyed. Both the DOM element and the owner Element instance are passed as parameters to the event handler.
Static
Readonly
EVENT_Fired when the Element gets disabled.
Static
Readonly
EVENT_Fired when the Element gets enabled.
Static
Readonly
EVENT_Fired when the Element gets hidden.
Static
Readonly
EVENT_Fired when the Element or any of its parent get hidden.
Static
Readonly
EVENT_Fired when the mouse starts hovering on the Element. The native DOM MouseEvent is passed as a parameter to the event handler.
Static
Readonly
EVENT_Fired when the mouse stops hovering on the Element. The native DOM MouseEvent is passed as a parameter to the event handler.
Static
Readonly
EVENT_Fired when the Element's parent gets set.
Static
Readonly
EVENT_Fired when the readOnly property of an Element changes.
Static
Readonly
EVENT_Fired when a child Element gets removed from the Container.
Static
Readonly
EVENT_Fired when the container gets resized using the resize handle.
Static
Readonly
EVENT_Fired when the container is scrolled. The native DOM scroll event is passed to the event handler.
Static
Readonly
EVENT_Fired when the Element stops being hidden.
Static
Readonly
EVENT_Fired when the Element and all of its parents become visible.
An overlay element.