fix max scroll lines number.

This commit is contained in:
Christopher Jeffrey 2013-07-14 23:37:36 -05:00
parent 4683b1d542
commit 158572ae38

View File

@ -2592,7 +2592,7 @@ ScrollableText.prototype.scroll = function(offset) {
if (this.content != null) {
this.parseContent();
max = this._clines.length - 1 - (this.height - (this.border ? 2 : 0) - this.padding * 2);
max = this._clines.length - (this.height - (this.border ? 2 : 0) - this.padding * 2);
if (max < 0) max = 0;
if (cb > max) {
@ -2613,7 +2613,7 @@ ScrollableText.prototype.scroll = function(offset) {
ScrollableText.prototype._recalculateIndex = function() {
if (this.detached) return;
var max = this._clines.length - 1 - (this.height - (this.border ? 2 : 0) - this.padding * 2);
var max = this._clines.length - (this.height - (this.border ? 2 : 0) - this.padding * 2);
if (max < 0) max = 0;
if (this.childBase > max) {