Skip to content
Snippets Groups Projects
Commit fd2c4573 authored by Fabian Homborg's avatar Fabian Homborg
Browse files

Make halflayout neighbours more consistent

Previously, it was possible to go down from tile 0 to tile 1, but not up
from 1 to 0.

Now, don't allow going down from tile 0 (as it's not actually down).
parent 31079bde
No related branches found
No related tags found
No related merge requests found
......@@ -290,8 +290,10 @@ HalfLayout.prototype._createTile = function(rect) {
tile.hasDirectNeighbour[Direction.Up] = true;
tile.neighbours[Direction.Up] = this.tiles.length - 1;
} else {
tile.hasDirectNeighbour[Direction.Up] = false;
tile.neighbours[Direction.Up] = - 1;
if (this.tiles.length == 0) {
tile.hasDirectNeighbour[Direction.Up] = false;
tile.neighbours[Direction.Up] = - 1;
}
}
tile.neighbours[Direction.Down] = - 1;
tile.hasDirectNeighbour[Direction.Down] = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment