Clean up result tab better (#3015)

* do a better job cleaning up results tab

* formatting
This commit is contained in:
Anthony Dresser
2018-10-26 13:27:01 -07:00
committed by Karl Burtram
parent fc3bdc9037
commit ff5a248240
5 changed files with 46 additions and 19 deletions

View File

@@ -10,8 +10,8 @@ import { IPanelView, IPanelTab } from 'sql/base/browser/ui/panel/panel';
import { Dimension } from 'vs/base/browser/dom';
import { localize } from 'vs/nls';
import * as UUID from 'vs/base/common/uuid';
import { Builder } from 'vs/base/browser/builder';
import { dispose, Disposable } from 'vs/base/common/lifecycle';
export class QueryPlanState {
xml: string;
@@ -25,6 +25,10 @@ export class QueryPlanTab implements IPanelTab {
constructor() {
this.view = new QueryPlanView();
}
public dispose() {
dispose(this.view);
}
}
export class QueryPlanView implements IPanelView {
@@ -44,6 +48,12 @@ export class QueryPlanView implements IPanelView {
this.container.style.overflow = 'scroll';
}
dispose() {
this.container.remove();
this.qp = undefined;
this.container = undefined;
}
public layout(dimension: Dimension): void {
this.container.style.width = dimension.width + 'px';
this.container.style.height = dimension.height + 'px';