Skip to content
Snippets Groups Projects
Commit 374a0370 authored by rhenck's avatar rhenck
Browse files

[editor] Fix z-index

The elements z-index is no longer ignored.
Isolation helps for having negative z-indices. Those elements no longer 
are hidden behind parent elements.
The helper grid need to have a large negative z-index to not interfere.
parent 1c5c0b28
No related branches found
No related tags found
No related merge requests found
import { CdkDragDrop } from '@angular/cdk/drag-drop';
import {
Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges
Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges
} from '@angular/core';
import { UIElement, UIElementType } from 'common/models/elements/element';
import { Section } from 'common/models/section';
......@@ -29,9 +29,9 @@ import { UnitService } from '../../services/unit.service';
<ng-content></ng-content>
`,
styles: [
'.grid-placeholder {border: 5px solid aliceblue; color: lightblue; text-align: center;}'
'.grid-placeholder {border: 5px solid aliceblue; color: lightblue; text-align: center; z-index: -100;}'
]
})
})
export class DynamicSectionHelperGridComponent implements OnInit, OnChanges {
@Input() autoColumnSize!: boolean;
@Input() autoRowSize!: boolean;
......
......@@ -25,12 +25,14 @@ import { DynamicSectionHelperGridComponent } from './dynamic-section-helper-grid
[gridRowSizes]="section.gridRowSizes"
[section]="section"
[sectionIndex]="sectionIndex"
[style.isolation]="'isolate'"
(transferElement)="transferElement.emit($event)">
<!-- Angular content projection is used in the helper grid component, where the following
is the content.-->
<aspect-dynamic-canvas-overlay *ngFor="let element of section.elements"
#elementComponent
[style.z-index]="element.position.zIndex"
[element]="$any(element)"
[style.margin-left]="[element.position.marginLeft] | measure"
[style.margin-right]="[element.position.marginRight] | measure"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment