mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
form should not default to100% by default (#1679)
This commit is contained in:
@@ -26,7 +26,7 @@ class FlexItem {
|
|||||||
template: `
|
template: `
|
||||||
<div *ngIf="items" class="flexContainer" [style.flexFlow]="flexFlow" [style.justifyContent]="justifyContent"
|
<div *ngIf="items" class="flexContainer" [style.flexFlow]="flexFlow" [style.justifyContent]="justifyContent"
|
||||||
[style.alignItems]="alignItems" [style.alignContent]="alignContent" [style.height]="height" [style.width]="width">
|
[style.alignItems]="alignItems" [style.alignContent]="alignContent" [style.height]="height" [style.width]="width">
|
||||||
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.order]="getItemOrder(item)" >
|
<div *ngFor="let item of items" [style.flex]="getItemFlex(item)" [style.textAlign]="textAlign" [style.order]="getItemOrder(item)" >
|
||||||
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore">
|
<model-component-wrapper [descriptor]="item.descriptor" [modelStore]="modelStore">
|
||||||
</model-component-wrapper>
|
</model-component-wrapper>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,6 +40,7 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
|
|||||||
private _justifyContent: string;
|
private _justifyContent: string;
|
||||||
private _alignItems: string;
|
private _alignItems: string;
|
||||||
private _alignContent: string;
|
private _alignContent: string;
|
||||||
|
private _textAlign: string;
|
||||||
private _height: string;
|
private _height: string;
|
||||||
private _width: string;
|
private _width: string;
|
||||||
|
|
||||||
@@ -65,6 +66,7 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
|
|||||||
this._justifyContent = layout.justifyContent ? layout.justifyContent : '';
|
this._justifyContent = layout.justifyContent ? layout.justifyContent : '';
|
||||||
this._alignItems = layout.alignItems ? layout.alignItems : '';
|
this._alignItems = layout.alignItems ? layout.alignItems : '';
|
||||||
this._alignContent = layout.alignContent ? layout.alignContent : '';
|
this._alignContent = layout.alignContent ? layout.alignContent : '';
|
||||||
|
this._textAlign = layout.textAlign ? layout.textAlign : '';
|
||||||
this._height = this.convertSize(layout.height);
|
this._height = this.convertSize(layout.height);
|
||||||
this._width = this.convertSize(layout.width);
|
this._width = this.convertSize(layout.width);
|
||||||
|
|
||||||
@@ -96,6 +98,10 @@ export default class FlexContainer extends ContainerBase<FlexItemLayout> impleme
|
|||||||
return this._alignContent;
|
return this._alignContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get textAlign(): string {
|
||||||
|
return this._textAlign;
|
||||||
|
}
|
||||||
|
|
||||||
private getItemFlex(item: FlexItem): string {
|
private getItemFlex(item: FlexItem): string {
|
||||||
return item.config ? item.config.flex : '1 1 auto';
|
return item.config ? item.config.flex : '1 1 auto';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,11 +118,11 @@ export default class FormContainer extends ContainerBase<FormItemLayout> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getFormWidth(): string {
|
private getFormWidth(): string {
|
||||||
return this.convertSize(this._formLayout && this._formLayout.width, '100%');
|
return this.convertSize(this._formLayout && this._formLayout.width, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
private getFormHeight(): string {
|
private getFormHeight(): string {
|
||||||
return this.convertSize(this._formLayout && this._formLayout.height, '100%');
|
return this.convertSize(this._formLayout && this._formLayout.height, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
private getComponentWidth(item: FormItem): string {
|
private getComponentWidth(item: FormItem): string {
|
||||||
|
|||||||
5
src/sql/sqlops.proposed.d.ts
vendored
5
src/sql/sqlops.proposed.d.ts
vendored
@@ -216,6 +216,11 @@ declare module 'sqlops' {
|
|||||||
* Container Width
|
* Container Width
|
||||||
*/
|
*/
|
||||||
width?: number | string;
|
width?: number | string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
textAlign?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FlexItemLayout {
|
export interface FlexItemLayout {
|
||||||
|
|||||||
Reference in New Issue
Block a user