Bottom margin in pixels. Default is 0.
Whether to fill the parent's height. Default is true.
Whether to fill the parent's width. Default is true.
Right margin in pixels. Default is 0.
StaticDisableFlag to globally disable resize functionality for all instances
StaticOutputFlag to enable debug logging for resize operations
ProtectedelementChecks if element is below a hidden tab
The element to check
True if element is below a hidden tab, false otherwise
ProtectedelementChecks if element is within a grid
The element to check
True if element is within a grid, false otherwise
ProtectedgetFinds the nearest block-level parent element
The element to find the parent for
The parent element or null if none found
Cleans up subscriptions when the directive is destroyed
Initializes the directive, sets up resize event listeners and performs initial resize
ProtectedresizePerforms the actual resize calculation and applies dimensions to the element
ProtectedshouldDetermines if resizing should be skipped for this element
The element to check
True if resizing should be skipped, false otherwise
Protected StaticOutputOutputs a debug message if OutputDebugInfo is enabled
The message to output
Directive that automatically resizes an element to fill its parent container. This directive calculates and sets dimensions based on the parent container's size, accounting for the element's position within the parent and any specified margins.
It listens for window resize events and custom MJ application events to update dimensions. The directive is context-aware and will automatically skip resizing in certain conditions.
Example