Skip to content

Commit

Permalink
Handle working alone scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitsing committed Jul 8, 2017
1 parent c276c0f commit b97f051
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/pairing_matrix/server/public/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ function PlayGround(selector) {
};

this.mouseOver = function (id) {
hideMatrix();
var connectedPairs = _.unique(_.flatten(playground.getAllPairsContaining(id)));
console.log(connectedPairs);
hideMatrix();
if (connectedPairs.length == 0) {
showPlayer(id);
return;
}

connectedPairs.forEach(function (pair) {
showPlayer(pair);
});
Expand Down

0 comments on commit b97f051

Please sign in to comment.