diff options
Diffstat (limited to 'js/matrix.js')
| -rw-r--r-- | js/matrix.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/matrix.js b/js/matrix.js index ccd90b2..98c132d 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -45,6 +45,12 @@ Matrix.prototype.forEach = function(f){ }) } Matrix.prototype.focusLex = function(y,x){ + if (x < 0) { + y -= 1 + } + if (x > this.aa[0].length) { + y += 1 + } this.aa[mod(y,this.h)][mod(x,this.w)].focus() } Matrix.prototype.clear = function(){ |
