diff options
Diffstat (limited to 'js/matrix.js')
| -rw-r--r-- | js/matrix.js | 9 |
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" |
