Remove resize helper object on table destruction

pull/542/head
Joost Molenkamp 2 years ago
parent 47e8c82923
commit 856964b396

@ -83,6 +83,12 @@ var PageResize = function ( dt, pageResizeManualDelta )
host.css( 'position', 'relative' ); host.css( 'position', 'relative' );
} }
var onDestroy = function () {
dt.off('.pageResize', onDestroy);
this.s.obj && this.s.obj.remove();
}.bind(this);
dt.on('destroy.pageResize', onDestroy);
this._attach(); this._attach();
this._size(); this._size();
}; };
@ -162,8 +168,10 @@ PageResize.prototype = {
obj obj
.appendTo( this.s.host ) .appendTo( this.s.host )
.attr( 'data', 'about:blank' ); .attr( 'data', 'about:blank' );
}
this.s.obj = obj;
}
}; };

Loading…
Cancel
Save