fixed issue with empty spots

main
joak 10 months ago
parent 42054a718e
commit 8de76a27a4

@ -49,7 +49,7 @@ xhr.onload = function() {
NAVI.classList.add("quiltnavigation"); NAVI.classList.add("quiltnavigation");
var up = grid.find((element) => element.x == found.x+1 && element.y == found.y ); var up = grid.find((element) => element.x == found.x+1 && element.y == found.y );
if(up){ if(up && up.link != "empty"){
var UP = document.createElement('a'); var UP = document.createElement('a');
UP.title = up.name; UP.title = up.name;
UP.href = up.link; UP.href = up.link;
@ -61,7 +61,7 @@ xhr.onload = function() {
var left = grid.find((element) => element.x == found.x && element.y == found.y-1 ); var left = grid.find((element) => element.x == found.x && element.y == found.y-1 );
if(left){ if(left && up.left != "empty"){
var LEFT = document.createElement('a'); var LEFT = document.createElement('a');
LEFT.title = left.name; LEFT.title = left.name;
LEFT.href = left.link; LEFT.href = left.link;
@ -82,7 +82,7 @@ xhr.onload = function() {
NAVI.append(CENTER); NAVI.append(CENTER);
var right = grid.find((element) => element.x == found.x && element.y == found.y+1 ); var right = grid.find((element) => element.x == found.x && element.y == found.y+1 );
if(right){ if(right && right.link != "empty"){
var RIGHT = document.createElement('a'); var RIGHT = document.createElement('a');
RIGHT.title = right.name; RIGHT.title = right.name;
RIGHT.href = right.link; RIGHT.href = right.link;
@ -93,7 +93,7 @@ xhr.onload = function() {
} }
var down = grid.find((element) => element.x == found.x-1 && element.y == found.y ); var down = grid.find((element) => element.x == found.x-1 && element.y == found.y );
if(down){ if(down && down.link != "empty"){
var DOWN = document.createElement('a'); var DOWN = document.createElement('a');
DOWN.title = down.name; DOWN.title = down.name;
DOWN.href = down.link; DOWN.href = down.link;

Loading…
Cancel
Save