Mixin that incorporates resize event handling. The mixin depends on the global window resize event and forwards any resize event to every existing instance of this class (global tracking).
Every instance of resizable is registered in the global list of resizable instances. The first instance, however, triggers the registration of the global window resize event listener.
Mutation observer for listening on element style changes.
Event identifier for resize event (single point of definition).
Resize event availability (cached value).
Array for referencing all instances of resizable.
Unregister this instance from the global list of resizable instances. On destruction of the last instance, the resize event handle is removed. Please note that destruction needs to be invoked explicitly.
Observe a certain element for style or class mutations. Any mutation invokes the resize event.
element that can be observed for style mutations (style mutation will trigger resize).
This function is invoked when a resize event happened.
Retrieves the native width and height of a given element in device pixel (size on screen in physical pixels). If the element is not found, or either window or its device pixel ratio are not defined, a default vec2 is returned. If the canvas size is not yet computed, i.e., not provided in px unit, undefined will be return.
DOM element to get the width and height in (native) pixel from.
This function is called when the window is resized (and the event listener was successfully registered). The event is forwarded to each registered resizable object.