Member Junction
    Preparing search index...

    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.

    <!-- Basic usage (fills both width and height) -->
    <div >Content</div>

    <!-- With custom settings -->
    <div [fillWidth]="true" [fillHeight]="true" [rightMargin]="10" [bottomMargin]="20">
    Content with margins
    </div>

    Implements

    • OnInit
    • OnDestroy
    Index

    Constructors

    Properties

    bottomMargin: number = 0

    Bottom margin in pixels. Default is 0.

    fillHeight: boolean = true

    Whether to fill the parent's height. Default is true.

    fillWidth: boolean = true

    Whether to fill the parent's width. Default is true.

    rightMargin: number = 0

    Right margin in pixels. Default is 0.

    DisableResize: boolean = false

    Flag to globally disable resize functionality for all instances

    OutputDebugInfo: boolean = false

    Flag to enable debug logging for resize operations

    Methods

    • Checks if element is below a hidden tab

      Parameters

      • element: HTMLElement

        The element to check

      Returns boolean

      True if element is below a hidden tab, false otherwise

    • Checks if element is within a grid

      Parameters

      • element: HTMLElement

        The element to check

      Returns boolean

      True if element is within a grid, false otherwise

    • Finds the nearest block-level parent element

      Parameters

      • element: HTMLElement

        The element to find the parent for

      Returns HTMLElement | null

      The parent element or null if none found

    • Cleans up subscriptions when the directive is destroyed

      Returns void

    • Initializes the directive, sets up resize event listeners and performs initial resize

      Returns void

    • Determines if resizing should be skipped for this element

      Parameters

      • el: HTMLElement

        The element to check

      Returns boolean

      True if resizing should be skipped, false otherwise

    • Outputs a debug message if OutputDebugInfo is enabled

      Parameters

      • message: string

        The message to output

      Returns void