provide oldSize in resize event
This commit is contained in:
parent
b2eac666e5
commit
2d6f56d8fd
1 changed files with 9 additions and 3 deletions
|
|
@ -344,7 +344,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
if (force)
|
||||
this.$renderChanges(changes, true);
|
||||
else
|
||||
this.$loop.schedule(changes || this.$changes);
|
||||
this.$loop.schedule(changes | this.$changes);
|
||||
|
||||
if (this.resizing)
|
||||
this.resizing = 0;
|
||||
|
|
@ -353,6 +353,12 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$updateCachedSize = function(force, gutterWidth, width, height) {
|
||||
var changes = 0;
|
||||
var size = this.$size;
|
||||
var oldSize = {
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
scrollerHeight: size.scrollerHeight,
|
||||
scrollerWidth: size.scrollerWidth
|
||||
};
|
||||
if (height && (force || size.height != height)) {
|
||||
size.height = height;
|
||||
changes = this.CHANGE_SIZE;
|
||||
|
|
@ -394,7 +400,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
}
|
||||
|
||||
if (changes)
|
||||
this._signal("resize");
|
||||
this._signal("resize", oldSize);
|
||||
|
||||
return changes;
|
||||
};
|
||||
|
|
@ -402,7 +408,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.onGutterResize = function() {
|
||||
var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
||||
if (gutterWidth != this.gutterWidth)
|
||||
this.$changes != this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
|
||||
this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
|
||||
|
||||
if (this.session.getUseWrapMode() && this.adjustWrapLimit())
|
||||
this.$loop.schedule(this.CHANGE_FULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue