In wrapMode, document.screenWidth = doc.. Fix typo
This commit is contained in:
parent
bc4c9c6060
commit
a3ff06a9e3
1 changed files with 7 additions and 2 deletions
|
|
@ -294,7 +294,7 @@ var Document = function(text, mode) {
|
||||||
|
|
||||||
this.getScreenWidth = function() {
|
this.getScreenWidth = function() {
|
||||||
this.$computeWidth();
|
this.$computeWidth();
|
||||||
return this.screenWith;
|
return this.screenWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$computeWidth = function() {
|
this.$computeWidth = function() {
|
||||||
|
|
@ -317,7 +317,12 @@ var Document = function(text, mode) {
|
||||||
longestScreenLine = Math.max(longestScreenLine, len);
|
longestScreenLine = Math.max(longestScreenLine, len);
|
||||||
}
|
}
|
||||||
this.width = longestLine;
|
this.width = longestLine;
|
||||||
this.screenWith = longestScreenLine;
|
|
||||||
|
if (this.$useWrapMode) {
|
||||||
|
this.screenWidth = this.$wrapLimit;
|
||||||
|
} else {
|
||||||
|
this.screenWidth = longestScreenLine;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue