Keep view.bounds in sync during 'resize' events.

Closes #1127
This commit is contained in:
Jürg Lehni 2016-08-03 13:08:08 +02:00
parent fa3456341c
commit 91371c1b47

View file

@ -389,12 +389,12 @@ var View = Base.extend(Emitter, /** @lends View# */{
return;
this._setElementSize(width, height);
this._viewSize._set(width, height);
// Call onResize handler on any size change
this._changed();
// Emit resize event on any size changes.
this.emit('resize', {
size: size,
delta: delta
});
this._changed();
if (this._autoUpdate) {
// Update right away, don't wait for the next animation frame as
// otherwise the view would flicker during resizes, see #1126