From 72ccfc7ca4f71987f69a5734d49a93ab78d9ebe8 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 30 Jun 2015 00:12:31 -0400 Subject: selection no longer requires grid --- js/matrix.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'js/matrix.js') diff --git a/js/matrix.js b/js/matrix.js index 0f38eeb..649321a 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -185,12 +185,13 @@ Matrix.prototype.resize = function(w,h){ this.rapper && this.resize_rapper() } Matrix.prototype.resize_rapper = function(){ - var cw = this.aa[0][0].span.offsetWidth - var ch = this.aa[0][0].span.offsetHeight - if (this.grid) { cw++; ch++ } + var cell = canvas.aa[0][0].span + var cw = cell.offsetWidth + var ch = cell.offsetHeight + if (canvas.grid) { cw++; ch++ } var width = cw * this.aa[0].length var height = ch * this.aa.length - if (this.grid) { width++; height++ } + if (canvas.grid) { width++; height++ } if (this.rotated) { this.rapper.parentNode.classList.add("rotated") this.rapper.parentNode.style.height = (width) + "px" -- cgit v1.2.3-70-g09d2