* 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 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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue