flexlayout-react
    Preparing search index...

    Class Actions

    Action creators for FlexLayout model mutations.

    Index
    ADD_TAB: string = "FlexLayout_AddTab"
    ADD_TAB_TO_NEW_GROUP: string = "FlexLayout_AddTabToNewGroup"
    ADJUST_BORDER_SPLIT: string = "FlexLayout_AdjustBorderSplit"
    ADJUST_WEIGHTS: string = "FlexLayout_AdjustWeights"
    CLOSE_POPOUT: string = "FlexLayout_ClosePopout"
    CREATE_SUBLAYOUT: string = "FlexLayout_CreateSubLayout"
    DELETE_TAB: string = "FlexLayout_DeleteTab"
    DELETE_TABSET: string = "FlexLayout_DeleteTabset"
    DOCK_FLOAT_TO_LAYOUT: string = "FlexLayout_DockFloatToLayout"
    GROUP: string = "FlexLayout_Group"
    MAXIMIZE_TOGGLE: string = "FlexLayout_MaximizeToggle"
    MOVE_FLOAT: string = "FlexLayout_MoveFloat"
    MOVE_FLOAT_TO_FRONT: string = "FlexLayout_MoveFloatToFront"
    MOVE_NODE: string = "FlexLayout_MoveNode"
    POPOUT_FLOAT: string = "FlexLayout_PopoutFloat"
    POPOUT_TAB: string = "FlexLayout_PopoutTab"
    POPOUT_TABSET: string = "FlexLayout_PopoutTabset"
    REMOVE_TAB_FROM_GROUP: string = "FlexLayout_RemoveTabFromGroup"
    RENAME_TAB: string = "FlexLayout_RenameTab"
    SELECT_TAB: string = "FlexLayout_SelectTab"
    SET_ACTIVE_TABSET: string = "FlexLayout_SetActiveTabset"
    SET_BORDER_TYPE: string = "FlexLayout_SetBorderType"
    SET_TAB_PINNED: string = "FlexLayout_SetTabPinned"
    UNGROUP: string = "FlexLayout_Ungroup"
    UPDATE_MODEL_ATTRIBUTES: string = "FlexLayout_UpdateModelAttributes"
    UPDATE_NODE_ATTRIBUTES: string = "FlexLayout_UpdateNodeAttributes"
    UPDATE_SUBLAYOUT_ATTRIBUTES: string = "FlexLayout_UpdateSubLayoutAttributes"
    • Adds a tab node to the given tabset node

      Parameters

      • json: ITabAttributes

        the json for the new tab node e.g {type:"tab", component:"table"}

      • toNodeId: string

        the new tab node will be added to the tabset with this node id

      • location: DockLocation

        the location where the new tab will be added, one of the DockLocation enum values.

      • index: number

        for docking to the center this value is the index of the tab, use -1 to add to the end.

      • Optionalselect: boolean

        (optional) whether to select the new tab, overriding autoSelectTab

      Returns Action

      the action

    • Creates a new group in the tab's parent tabset/border and moves the tab into it. The group is inserted at the tab's position, so the tab becomes the first (and initially only) member.

      Parameters

      • tabNodeId: string

        the id of the tab to move into the new group

      • Optionalname: string

        optional name for the new group

      • Optionalcolor: string

        optional color for the new group (a css color)

      Returns Action

      the action

    • Adjust the size of the border

      Parameters

      • nodeId: string

        the id of the border node to adjust

      • size: number

        the new border size

      Returns Action

      the action

    • Adjust the weights of a row, used when the splitter is moved

      Parameters

      • nodeId: string

        the id of the row node whose childrens weights are being adjusted

      • weights: number[]

        an array of weights to be applied to the children

      Returns Action

      the action

    • Closes the popout

      Parameters

      • layoutId: string

        the id of the popout to close

      Returns Action

      the action

    • Creates a new empty popout window with the given layout (alias for createSubLayout)

      Parameters

      • layout: IJsonRowNode

        the json layout for the new window

      • rect: IJsonRect

        the window rectangle in screen coordinates

      • type: ILayoutType

        the type of the popout either "window", "float"

      Returns Action

      the action

    • Creates a new sublayout with the given layout

      Parameters

      • layout: IJsonRowNode

        the json layout for the new window

      • rect: IJsonRect

        the window rectangle in screen coordinates

      • type: ILayoutType

        the type of the sublayout either "window", "float" or "tab"

      Returns Action

      the action

    • Deletes a tab node from the layout

      Parameters

      • tabNodeId: string

        the id of the tab node to delete

      Returns Action

      the action

    • Deletes a tabset node and all it's child tab nodes from the layout

      Parameters

      • tabsetNodeId: string

        the id of the tabset node to delete

      Returns Action

      the action

    • Docks a floating panel's whole layout into another layout.

      Parameters

      • layoutId: string

        the id of the float layout to dock

      • toNodeId: string

        the id of a tabset or root row in the target layout to dock into

      • location: DockLocation

        the location where the moved layout will be added, one of the DockLocation enum values (CENTER is ignored)

      • index: number

        for docking to the center this value is the index of the tab, use -1 to add to the end

      Returns Action

      the action

    • Groups multiple actions into a single GroupAction. When performed, the model applies the contained actions in sequence between a single onBeforeAction/onAfterAction listener pair, so the batch is a single undo step and a single entry in an action log.

      Parameters

      • actions: Action[]

        the actions to perform together, in order

      Returns GroupAction

      the group action

    • Maximizes the given tabset

      Parameters

      • tabsetNodeId: string

        the id of the tabset to maximize

      • OptionallayoutId: string

      Returns Action

      the action

    • Moves a floating panel

      Parameters

      • layoutId: string

        the id of the floating panel to move

      • rect: Rect

        the new rectangle

      Returns Action

      the action

    • Moves a node (tab or tabset) from one location to another

      Parameters

      • fromNodeId: string

        the id of the node to move

      • toNodeId: string

        the id of the node to receive the moved node

      • location: DockLocation

        the location where the moved node will be added, one of the DockLocation enum values.

      • index: number

        for docking to the center this value is the index of the tab, use -1 to add to the end.

      • Optionalselect: boolean

        (optional) whether to select the moved tab(s) in new tabset, overriding autoSelectTab

      Returns Action

      the action

    • Moves a floating panel popout to the front of the display

      Parameters

      • layoutId: string

        the id of the floating panel popout to move

      Returns Action

      the action

    • Converts a floating panel into a native popout window (the reverse of closePopout). The layout keeps its id and content; the given rect should be in screen coordinates.

      Parameters

      • layoutId: string

        the id of the float layout to popout

      • Optionalrect: IJsonRect

        optional the screen rectangle for the new window

      Returns Action

      the action

    • Pops out the given tab node into a new browser window or floating panel

      Parameters

      • nodeId: string

        the tab node to popout

      • type: ILayoutType = "window"

        the type of window to create, either "window" (native browser window) or "float" (simulated div based window)

      Returns Action

      the action

    • Pops out the given tabset node into a new browser window or floating panel

      Parameters

      • nodeId: string

        the tabset node to popout

      • type: ILayoutType = "window"

        the type of window to create, either "window" (native browser window) or "float" (simulated div based window)

      Returns Action

      the action

    • Moves a tab out of its group into the group's parent tabset/border, directly after the group. The group is deleted if it becomes empty.

      Parameters

      • tabNodeId: string

        the id of the tab to remove from its group

      Returns Action

      the action

    • Change the given nodes tab text

      Parameters

      • tabNodeId: string

        the id of the tab node to rename

      • text: string

        the test of the tab

      Returns Action

      the action

    • Selects the given tab in its parent tabset

      Parameters

      • tabNodeId: string

        the id of the tab node to set selected

      Returns Action

      the action

    • Set the given tabset node as the active tabset

      Parameters

      • tabsetNodeId: string | undefined

        the id of the tabset node to set as active

      • OptionallayoutId: string

      Returns Action

      the action

    • Sets the display type of the given border. In 'overlay' mode the selected tab's panel overlays the main layout area instead of insetting it (Visual Studio style auto hide), and is deselected by a pointer-down in the main layout area.

      Parameters

      • borderNodeId: string

        the id of the border node (border ids are "border_" + location, e.g. "border_left")

      • borderType: "split" | "overlay"

        the new border type

      Returns Action

      the action

    • Pins or unpins the given tab; pinning moves it to the end of the pinned group at the start of its tabset's tabstrip, unpinning moves it to the start of the unpinned tabs. Only applies to tabs in tabsets (ignored for border tabs).

      Parameters

      • tabNodeId: string

        the id of the tab node to pin/unpin

      • pinned: boolean

        the new pinned state

      Returns Action

      the action

    • Moves every tab of the given group back into the group's parent tabset/border (at the group's position) and deletes the now-empty group. The group's color/name is lost.

      Parameters

      • groupNodeId: string

        the id of the group to ungroup

      Returns Action

      the action

    • Updates the global model jsone attributes

      Parameters

      • attributes: IGlobalAttributes

        the json for the model attributes to update (merge into the existing attributes)

      Returns Action

      the action

    • Updates the given sublayout's json attributes

      Parameters

      • layoutId: string

        the id of the sublayout to update

      • attributes: ISubLayoutAttributes

        the json attributes to update (merge with the existing attributes)

      Returns Action

      the action