LJYQRJZO6RV5SBP4SVFYBF676VNF36UN2RVTUJKORC4WZR7XMKQQC
this.edges[dim][side] = screen;
screen.edges[dim][1 - side] = this;
newEdges[dim][side] = screen;
});
});
// Remove old connections
this.edges.forEach((edgeDim, dim) => {
edgeDim.forEach((screen, side) => {
if (screen) {
screen.edges[dim][1 - side] = null;
}
});
});
// Create new connections
this.edges = newEdges;
this.edges.forEach((edgeDim, dim) => {
edgeDim.forEach((screen, side) => {
if (screen) {
screen.edges[dim][1 - side] = this;
}
Screen.prototype.dragStart = function(e) {
// Disconnect from cluster
this.edges.forEach((edgeDim, dim) => {
edgeDim.forEach((screen, side) => {
if (screen) {
screen.edges[dim][1 - side] = null;
}
});
});
this.edges = [[null, null], [null, null]];
};