Refactor chart viewer (#2381)

* working on adding charts

* working on chart options

* adding image and table insight

* add chart viewing and handle a bunch of small bugs

* formatting

* remove unused code
This commit is contained in:
Anthony Dresser
2018-08-31 12:55:34 -07:00
committed by GitHub
parent 54ee1c23f0
commit 8e0c19fc8d
25 changed files with 1919 additions and 40 deletions

View File

@@ -142,3 +142,8 @@ panel {
.visibility.hidden {
visibility: hidden;
}
.tabBody {
width: 100%;
height: 100%;
}

View File

@@ -78,12 +78,16 @@ export class TabbedPanel extends Disposable implements IThemable {
} else {
this._headerVisible = false;
}
this.$body = $('tabBody');
this.$body = $('.tabBody');
this.$body.attr('role', 'tabpanel');
this.$body.attr('tabindex', '0');
this.$parent.append(this.$body);
}
public contains(tab: IPanelTab): boolean {
return this._tabMap.has(tab.identifier);
}
public pushTab(tab: IPanelTab): PanelTabIdentifier {
let internalTab = tab as IInternalPanelTab;
this._tabMap.set(tab.identifier, internalTab);
@@ -94,6 +98,7 @@ export class TabbedPanel extends Disposable implements IThemable {
if (this._tabMap.size > 1 && !this._headerVisible) {
this.$parent.append(this.$header, 0);
this._headerVisible = true;
this.layout(this._currentDimensions);
}
return tab.identifier as PanelTabIdentifier;
}
@@ -170,6 +175,8 @@ export class TabbedPanel extends Disposable implements IThemable {
public layout(dimension: Dimension): void {
this._currentDimensions = dimension;
this.$parent.style('height', dimension.height + 'px');
this.$parent.style('width', dimension.width + 'px');
this.$header.style('width', dimension.width + 'px');
this.$body.style('width', dimension.width + 'px');
const bodyHeight = dimension.height - (this._headerVisible ? this.headersize : 0);