summaryrefslogtreecommitdiff
path: root/js/matrix.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-06-30 00:12:31 -0400
committerJules Laplace <jules@okfoc.us>2015-06-30 00:12:31 -0400
commit72ccfc7ca4f71987f69a5734d49a93ab78d9ebe8 (patch)
tree08d8db18f268044b932f617ba819ca2fd2178d0b /js/matrix.js
parentafe71482758d953d819daab995bf5400029396d3 (diff)
selection no longer requires grid
Diffstat (limited to 'js/matrix.js')
-rw-r--r--js/matrix.js9
1 files changed, 5 insertions, 4 deletions
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"