From bb0fe85b5267f46e7ed9c660e3d027bb785b440c Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 13 Mar 2007 07:55:17 +0000 Subject: [PATCH] fix resize issues --- chrome/content/zotero/xpcom/annotate.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/chrome/content/zotero/xpcom/annotate.js b/chrome/content/zotero/xpcom/annotate.js index 837f67495..4f573609d 100644 --- a/chrome/content/zotero/xpcom/annotate.js +++ b/chrome/content/zotero/xpcom/annotate.js @@ -862,20 +862,13 @@ Zotero.Annotation.prototype._doDrag = function(e) { var rowSize = this.textarea.clientHeight/this.textarea.rows; // update cols and rows - if(Math.abs(x) > colSize) { - var cols = this.clickStartCols+Math.floor(x/colSize); - cols = (cols > 5 ? cols : 5); - - this.textarea.cols = this.cols = cols; - } - if(Math.abs(y) > rowSize) { - var rows = this.clickStartRows+Math.floor(y/rowSize); - rows = (rows > 2 ? rows : 2); - - this.textarea.rows = this.rows = rows; - } + var cols = this.clickStartCols+Math.floor(x/colSize); + cols = (cols > 5 ? cols : 5); + this.textarea.cols = this.cols = cols; - Zotero.debug("cols: "+cols+", "+rows); + var rows = this.clickStartRows+Math.floor(y/rowSize); + rows = (rows > 2 ? rows : 2); + this.textarea.rows = this.rows = rows; // not sure why this is necessary this.div.style.width = (6+this.textarea.offsetWidth)+"px";