Tutorial: window.mergeGroups

window.mergeGroups

Merges the instance's window group with the same window group as the specified window.

Example

var finWindowOne = new fin.desktop.Window({
    url: "http://www.openfin.co",
    name: "finWindowOne",
    autoShow: true
});
var finWindowTwo = new fin.desktop.Window({
    url: "http://www.openfin.co",
    name: "finWindowTwo",
    autoShow: true
});
var finWindowThree = new fin.desktop.Window({
    url: "http://www.openfin.co",
    name: "finWindowThree",
    autoShow: true
});
var finWindowFour = new fin.desktop.Window({
    url: "http://www.openfin.co",
    name: "finWindowFour",
    autoShow: true
});

// When finWindowOne moves or is moved, finWindowTwo moves by the same amount
finWindowOne.joinGroup(finWindowTwo);

// When finWindowThree moves or is moved, finWindowFour moves by the same amount
finWindowThree.joinGroup(finWindowFour);

// finWindowOne, finWindowTwo, finWindowThree, and finWindowFour now move together in the same group
finWindowOne.mergeGroups(finWindowThree);