mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fixed two layout issues in model view components (#1647)
This commit is contained in:
@@ -138,9 +138,17 @@ export abstract class ComponentBase extends Disposable implements IComponent, On
|
|||||||
return +size;
|
return +size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected getWidth(): string {
|
||||||
|
return this.width ? this.convertSize(this.width) : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected getHeight(): string {
|
||||||
|
return this.height ? this.convertSize(this.height) : '';
|
||||||
|
}
|
||||||
|
|
||||||
protected convertSize(size: number | string): string {
|
protected convertSize(size: number | string): string {
|
||||||
if (types.isUndefinedOrNull(size)) {
|
if (types.isUndefinedOrNull(size)) {
|
||||||
return '';
|
return '100%';
|
||||||
}
|
}
|
||||||
let convertedSize: string = size ? size.toString() : '100%';
|
let convertedSize: string = size ? size.toString() : '100%';
|
||||||
if (!convertedSize.toLowerCase().endsWith('px') && !convertedSize.toLowerCase().endsWith('%')) {
|
if (!convertedSize.toLowerCase().endsWith('px') && !convertedSize.toLowerCase().endsWith('%')) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { attachListStyler } from 'vs/platform/theme/common/styler';
|
|||||||
selector: 'modelview-dropdown',
|
selector: 'modelview-dropdown',
|
||||||
template: `
|
template: `
|
||||||
|
|
||||||
<div>
|
<div [style.width]="getWidth()">
|
||||||
<div [style.display]="getEditableDisplay()" #editableDropDown style="width: 100%;"></div>
|
<div [style.display]="getEditableDisplay()" #editableDropDown style="width: 100%;"></div>
|
||||||
<div [style.display]="getNotEditableDisplay()" #dropDown style="width: 100%;"></div>
|
<div [style.display]="getNotEditableDisplay()" #dropDown style="width: 100%;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user