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;
|
var rowSize = this.textarea.clientHeight/this.textarea.rows;
|
||||||
|
|
||||||
// update cols and rows
|
// update cols and rows
|
||||||
if(Math.abs(x) > colSize) {
|
var cols = this.clickStartCols+Math.floor(x/colSize);
|
||||||
var cols = this.clickStartCols+Math.floor(x/colSize);
|
cols = (cols > 5 ? cols : 5);
|
||||||
cols = (cols > 5 ? cols : 5);
|
this.textarea.cols = this.cols = cols;
|
||||||
|
|
||||||
this.textarea.cols = this.cols = cols;
|
var rows = this.clickStartRows+Math.floor(y/rowSize);
|
||||||
}
|
rows = (rows > 2 ? rows : 2);
|
||||||
if(Math.abs(y) > rowSize) {
|
this.textarea.rows = this.rows = rows;
|
||||||
var rows = this.clickStartRows+Math.floor(y/rowSize);
|
|
||||||
rows = (rows > 2 ? rows : 2);
|
|
||||||
|
|
||||||
this.textarea.rows = this.rows = rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
Zotero.debug("cols: "+cols+", "+rows);
|
|
||||||
|
|
||||||
// not sure why this is necessary
|
// not sure why this is necessary
|
||||||
this.div.style.width = (6+this.textarea.offsetWidth)+"px";
|
this.div.style.width = (6+this.textarea.offsetWidth)+"px";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user