In wrapMode, document.screenWidth = doc.. Fix typo

This commit is contained in:
Julian Viereck 2011-01-09 01:40:43 +01:00
commit a3ff06a9e3

View file

@ -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;
}
} }
}; };