oktw says to #ysitd
"check":c=Math.sqrt(Math.pow(d.h- d.g,2)+Math.pow(d.j-d.i,2)),console.log(c),50>c||(c=Math.abs(d.h-d.g)>Math.abs(d.j-d.i)?"x":"y",e=0<d[c+"_end"]-d[c+"_start"],console.log(c,e),"x"===c&&e&&f({which:a.c}),"y"===c&&e&&f({which:a.a}),"x"!==c||e||f({which:a.b}),"y"!==c||e||f({which:a.f}))}}var