Options
All
  • Public
  • Public/Protected
  • All
Menu

External module Snap-and-Dock

Index

Functions

undockGroup

  • undockGroup(identity?: Identity): Promise<void>
  • Will undock every window that is currently connected to a current window.

    This will completely disband the entire group, not just the windows directly touching identity.

    Has no effect if identity isn't currently snapped to any other window.

    import {undockGroup} from 'openfin-layouts';
    
    // Undock all windows attached to the current window (all are equivilant)
    undockGroup();
    undockGroup(fin.desktop.Window.getCurrent());   // Using 'v1' API
    undockGroup(fin.Window.getCurrentSync());       // Using 'v2' API
    
    // Undock all windows attached to a different window
    undockGroup({uuid: 'my-app', name: 'other-window'});
    throws

    Error: If identity is not a valid WindowIdentity

    throws

    Error: If the window specified by identity does not exist

    throws

    Error: If the window specified by identity has been de-registered

    Parameters

    • Default value identity: Identity = getId()

      A window belonging to the group that should be disbanded, defaults to the current window/group

    Returns Promise<void>

undockWindow

  • undockWindow(identity?: Identity): Promise<void>
  • Undocks a window from any group it currently belongs to.

    Has no effect if the window is not currently docked.

    import {undockWindow} from 'openfin-layouts';
    
    // Undock the current window (all are equivilant)
    undockWindow();
    undockWindow(fin.desktop.Window.getCurrent());   // Using 'v1' API
    undockWindow(fin.Window.getCurrentSync());       // Using 'v2' API
    
    // Undock a different window
    undockWindow({uuid: 'my-app', name: 'other-window'});
    throws

    Error: If identity is not a valid WindowIdentity

    throws

    Error: If the window specified by identity does not exist

    throws

    Error: If the window specified by identity has been de-registered

    Parameters

    • Default value identity: Identity = getId()

      The window to undock, defaults to the current window

    Returns Promise<void>