* Fixed recursion issue

This commit is contained in:
Ruben Daniels 2012-06-13 23:29:19 -07:00
commit 5e6d40f462

View file

@ -291,12 +291,12 @@ var VirtualRenderer = function(container, theme) {
var changes = this.CHANGE_SIZE;
var size = this.$size;
if (this.resizing) {
force = 2;
height = size.height;
width = size.width;
}
this.resizing = force;
if (this.resizing > 2)
return;
else if (this.resizing > 1)
this.resizing++;
else
this.resizing = force ? 1 : 0;
if (!height)
height = dom.getInnerHeight(this.container);
@ -315,7 +315,7 @@ var VirtualRenderer = function(container, theme) {
if (!width)
width = dom.getInnerWidth(this.container);
if (force || size.width != width) {
if (force || this.resizing > 1 || size.width != width) {
size.width = width;
var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
@ -327,12 +327,12 @@ var VirtualRenderer = function(container, theme) {
changes = changes | this.CHANGE_FULL;
}
if (force || this.resizing)
if (force)
this.$renderChanges(changes, true);
else
this.$loop.schedule(changes);
if (force === true)
if (force)
delete this.resizing;
};