Tutorial: window.joinGroup

window.joinGroup

Joins the same window group as the specified window. When windows are joined, if the user moves one of the windows, all other windows in the same group move too. This function is to be used when docking to other windows. If the window is already within a group, it will leave that group to join the new one.

Example

var mainWindow = fin.desktop.Window.getCurrent(),
    secondWindow = new fin.desktop.Window({
    url: "http://www.openfin.co",
    name: "secondWindow",
    autoShow: true
}, function () {
    // When mainWindow moves or is moved, secondWindow moves by the same amount
    secondWindow.joinGroup(mainWindow);
});