mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 17:23:31 -05:00
fix layout and add css styling for flex item (#2231)
This commit is contained in:
@@ -26,7 +26,7 @@ class FlexItem {
|
||||
template: `
|
||||
<div *ngIf="items" class="flexContainer" [style.flexFlow]="flexFlow" [style.justifyContent]="justifyContent"
|
||||
[style.alignItems]="alignItems" [style.alignContent]="alignContent" [style.height]="height" [style.width]="width">
|
||||
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" >
|
||||
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" [ngStyle]="getItemStyles(item)">
|
||||
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore">
|
||||
</model-component-wrapper>
|
||||
</div>
|
||||
@@ -108,4 +108,7 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
|
||||
private getItemOrder(item: FlexItem): number {
|
||||
return item.config ? item.config.order : 0;
|
||||
}
|
||||
private getItemStyles(item: FlexItem): { [key: string]: string } {
|
||||
return item.config && item.config.CSSStyles ? item.config.CSSStyles : {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import * as sqlops from 'sqlops';
|
||||
@Component({
|
||||
selector: 'modelview-content',
|
||||
template: `
|
||||
<div *ngIf="rootDescriptor" style="width: 100%; height: 100%;">
|
||||
<div *ngIf="rootDescriptor" style="width: 100%; height: 100%; position: absolute;">
|
||||
<model-component-wrapper style="display: block; height: 100%" [descriptor]="rootDescriptor" [modelStore]="modelStore">
|
||||
</model-component-wrapper>
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface DialogComponentParams extends IBootstrapParams {
|
||||
<h1 class="wizardPageTitle">{{_dialogPane.title}}</h1>
|
||||
<div *ngIf="_dialogPane.description">{{_dialogPane.description}}</div>
|
||||
</div>
|
||||
<modelview-content [modelViewId]="modelViewId">
|
||||
<modelview-content [modelViewId]="modelViewId" style="flex: 1 1 auto; position: relative;">
|
||||
</modelview-content>
|
||||
</div>
|
||||
<modelview-content [modelViewId]="modelViewId" *ngIf="!_dialogPane || !_dialogPane.displayPageTitle">
|
||||
|
||||
@@ -59,5 +59,7 @@
|
||||
|
||||
.dialogContainer {
|
||||
display: flex;
|
||||
flex-direction: column
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
4
src/sql/sqlops.proposed.d.ts
vendored
4
src/sql/sqlops.proposed.d.ts
vendored
@@ -270,6 +270,10 @@ declare module 'sqlops' {
|
||||
* Default is "1 1 auto".
|
||||
*/
|
||||
flex?: string;
|
||||
/**
|
||||
* Matches the CSS style key and its available values.
|
||||
*/
|
||||
CSSStyles?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface FormItemLayout {
|
||||
|
||||
Reference in New Issue
Block a user