Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PerspectiveWorkspace when tabbed views are moved to master #831

Merged
merged 3 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/perspective-phosphor/src/theme/material/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@
content: "cast";
font-family: "Material Icons";
}

.p-MenuItem-detail:before {
content: "notes";
font-family: "Material Icons";
}
15 changes: 3 additions & 12 deletions packages/perspective-phosphor/src/ts/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ export class PerspectiveWidget extends Widget {
// do computed last
this.computed_columns = computed_columns;
this.filters = filters;

this._displayed = false;
}

/**********************/
Expand Down Expand Up @@ -120,9 +118,7 @@ export class PerspectiveWidget extends Widget {
}

notifyResize(): void {
if (this.isAttached && !this.displayed) {
this._displayed = true;
} else if (this.isAttached) {
if (this.isVisible) {
this.viewer.notifyResize();
}
}
Expand Down Expand Up @@ -327,7 +323,7 @@ export class PerspectiveWidget extends Widget {
this.node.classList.add(PSP_CONTAINER_CLASS);
this.node.classList.remove(PSP_CONTAINER_CLASS_DARK);
}
if (this._displayed) {
if (this.isAttached) {
this.viewer.restyleElement();
}
}
Expand All @@ -344,14 +340,10 @@ export class PerspectiveWidget extends Widget {
}
}

toggleConfig() {
toggleConfig(): void {
this._viewer.toggleConfig();
}

get displayed(): boolean {
return this._displayed;
}

static createNode(node: HTMLDivElement): PerspectiveViewer {
node.classList.add("p-Widget");
node.classList.add(PSP_CONTAINER_CLASS);
Expand Down Expand Up @@ -387,5 +379,4 @@ export class PerspectiveWidget extends Widget {
private _client: boolean;
private _dark: boolean;
private _editable: boolean;
private _displayed: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class PerspectiveWorkspace extends SplitPanel {
}

this.masterpanel.addWidget(widget);
widget.isHidden && widget.show();
widget.viewer.restyleElement();

widget.viewer.addEventListener("perspective-click", this.onPerspectiveClick);
Expand Down