mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 17:22:48 -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;
|
||||
}
|
||||
|
||||
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 {
|
||||
if (types.isUndefinedOrNull(size)) {
|
||||
return '';
|
||||
return '100%';
|
||||
}
|
||||
let convertedSize: string = size ? size.toString() : '100%';
|
||||
if (!convertedSize.toLowerCase().endsWith('px') && !convertedSize.toLowerCase().endsWith('%')) {
|
||||
|
||||
@@ -27,7 +27,7 @@ import { attachListStyler } from 'vs/platform/theme/common/styler';
|
||||
selector: 'modelview-dropdown',
|
||||
template: `
|
||||
|
||||
<div>
|
||||
<div [style.width]="getWidth()">
|
||||
<div [style.display]="getEditableDisplay()" #editableDropDown style="width: 100%;"></div>
|
||||
<div [style.display]="getNotEditableDisplay()" #dropDown style="width: 100%;"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user