Event fired when one window is undocked from it's neighbor(s).
It is not possible to receive events for another window. When adding a listener, the listener will only ever fire for the "fin.desktop.Window.getCurrent()"
window.
import {addEventListener} from 'openfin-layouts';
addEventListener('window-undocked', async (event: WindowUndockedEvent) => {
console.log("Undocked from another window");
// Using 'v1' API
fin.desktop.Window.getCurrent().getGroup((windows) => {
console.log("Windows in current group: ", windows);
});
// Using 'v2' API
console.log("Windows in current group: ", await fin.Window.getCurrentSync().getGroup());
});
The service considers any windows that are tabbed together to also be in the same snap group, so this event will also fire when a window is removed from a tab group. This may change in future versions of the service.
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 {snapAndDock} from 'openfin-layouts';
// Undock all windows attached to the current window (all are equivilant)
snapAndDock.undockGroup();
snapAndDock.undockGroup(fin.desktop.Window.getCurrent()); // Using 'v1' API
snapAndDock.undockGroup(fin.Window.getCurrentSync()); // Using 'v2' API
// Undock all windows attached to a different window
snapAndDock.undockGroup({uuid: 'my-app', name: 'other-window'});
A window belonging to the group that should be disbanded, defaults to the current window/group
Undocks a window from any group it currently belongs to.
Has no effect if the window is not currently docked.
import {snapAndDock} from 'openfin-layouts';
// Undock the current window (all are equivilant)
snapAndDock.undockWindow();
snapAndDock.undockWindow(fin.desktop.Window.getCurrent()); // Using 'v1' API
snapAndDock.undockWindow(fin.Window.getCurrentSync()); // Using 'v2' API
// Undock a different window
snapAndDock.undockWindow({uuid: 'my-app', name: 'other-window'});
The window to undock, defaults to the current window
Event fired when one window is docked to another.
It is not possible to receive events for another window. When adding a listener, the listener will only ever fire for the "
fin.desktop.Window.getCurrent()" window.import {addEventListener} from 'openfin-layouts'; addEventListener('window-docked', async (event: WindowDockedEvent) => { console.log("Docked to another window"); // Using 'v1' API fin.desktop.Window.getCurrent().getGroup((windows) => { console.log("Windows in current group: ", windows); }); // Using 'v2' API console.log("Windows in current group: ", await fin.Window.getCurrentSync().getGroup()); });The service considers any windows that are tabbed together to also be in the same snap group, so this event will also fire when a window is added to a tab group. This may change in future versions of the service.
window-docked