commandline in demo remains hidden sometimes

This commit is contained in:
nightwing 2013-09-09 17:32:19 +04:00
commit bc4b1324b7
2 changed files with 7 additions and 5 deletions

View file

@ -63,11 +63,11 @@ var Text = function(parentEl) {
};
this.getLineHeight = function() {
return this.$characterSize.height || 1;
return this.$characterSize.height || 0;
};
this.getCharacterWidth = function() {
return this.$characterSize.width || 1;
return this.$characterSize.width || 0;
};
this.checkForSizeChanges = function() {

View file

@ -143,8 +143,8 @@ var VirtualRenderer = function(container, theme) {
firstRow : 0,
firstRowScreen: 0,
lastRow : 0,
lineHeight : 1,
characterWidth : 1,
lineHeight : 0,
characterWidth : 0,
minHeight : 1,
maxHeight : 1,
offset : 0,
@ -748,6 +748,9 @@ var VirtualRenderer = function(container, theme) {
this.$changes |= changes;
return this.onResize(true);
}
if (!this.lineHeight) {
this.$textLayer.checkForSizeChanges();
}
// this.$logChanges(changes);
this._signal("beforeRender");
@ -770,7 +773,6 @@ var VirtualRenderer = function(container, theme) {
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBarV();
this.$updateScrollBarH();