* Fixed recursion issue
This commit is contained in:
parent
575cec571e
commit
5e6d40f462
1 changed files with 9 additions and 9 deletions
|
|
@ -291,12 +291,12 @@ var VirtualRenderer = function(container, theme) {
|
||||||
var changes = this.CHANGE_SIZE;
|
var changes = this.CHANGE_SIZE;
|
||||||
var size = this.$size;
|
var size = this.$size;
|
||||||
|
|
||||||
if (this.resizing) {
|
if (this.resizing > 2)
|
||||||
force = 2;
|
return;
|
||||||
height = size.height;
|
else if (this.resizing > 1)
|
||||||
width = size.width;
|
this.resizing++;
|
||||||
}
|
else
|
||||||
this.resizing = force;
|
this.resizing = force ? 1 : 0;
|
||||||
|
|
||||||
if (!height)
|
if (!height)
|
||||||
height = dom.getInnerHeight(this.container);
|
height = dom.getInnerHeight(this.container);
|
||||||
|
|
@ -315,7 +315,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
if (!width)
|
if (!width)
|
||||||
width = dom.getInnerWidth(this.container);
|
width = dom.getInnerWidth(this.container);
|
||||||
if (force || size.width != width) {
|
if (force || this.resizing > 1 || size.width != width) {
|
||||||
size.width = width;
|
size.width = width;
|
||||||
|
|
||||||
var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
|
var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
|
||||||
|
|
@ -327,12 +327,12 @@ var VirtualRenderer = function(container, theme) {
|
||||||
changes = changes | this.CHANGE_FULL;
|
changes = changes | this.CHANGE_FULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force || this.resizing)
|
if (force)
|
||||||
this.$renderChanges(changes, true);
|
this.$renderChanges(changes, true);
|
||||||
else
|
else
|
||||||
this.$loop.schedule(changes);
|
this.$loop.schedule(changes);
|
||||||
|
|
||||||
if (force === true)
|
if (force)
|
||||||
delete this.resizing;
|
delete this.resizing;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue