fix resize issues
This commit is contained in:
parent
5c1949f572
commit
bb0fe85b52
|
@ -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);
|
||||
var cols = this.clickStartCols+Math.floor(x/colSize);
|
||||
cols = (cols > 5 ? cols : 5);
|
||||
this.textarea.cols = this.cols = cols;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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";
|
||||
|
|
Loading…
Reference in New Issue
Block a user