Skip to content

Commit

Permalink
Change lu-backdrop parent node
Browse files Browse the repository at this point in the history
  • Loading branch information
oltionchampari committed Apr 7, 2020
1 parent 2506ddd commit e787860
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/lineup/ARankingView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ export abstract class ARankingView extends AView {
violationChanged: (_: IRule, violation: string) => this.panel.setViolation(violation)
}));

// LineUp creates an element with class `lu-backdrop` that fades out all content when a dialog is opened.
// Append `lu-backdrop` one level higher so fading effect can be applied also to the sidePanel when a dialog is opened.
const luBackdrop = this.node.querySelector('.lu-backdrop');
this.node.appendChild(luBackdrop);

this.panel = new LineUpPanelActions(this.provider, this.taggle.ctx, this.options, this.node.ownerDocument);
this.panel.on(LineUpPanelActions.EVENT_SAVE_NAMED_SET, (_event, order: number[], name: string, description: string, sec: Partial<ISecureItem>) => {
this.saveNamedSet(order, name, description, sec);
Expand Down
6 changes: 4 additions & 2 deletions src/styles/_view_lineup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
line-height: 1;
}

> div {
// Select only first div containing the `lineup-engine`.
// Don't select the `div.lu-backdrop` element
> div:first-child() {
flex: 1 1 auto;
position: relative;
}

&.overview-detail {
> div {
> div:first-child() {
display: flex;
flex-direction: column;

Expand Down

0 comments on commit e787860

Please sign in to comment.