Fix Default Height for Editor Component (#2920)

Editor component didn't have a minimum height set, so fixing this by passing through a minimum height to EditorComponent. Now, if the scrollable height of the editor is less than the minimum height, we use the minimum height as the height of the component.

Also fixed an issue where the markdown code editor's height was far too high. Now we're calculating the height on the layout() call, which gets called every time we display the markdown editor.
This commit is contained in:
Chris LaFreniere
2018-10-17 10:18:04 -07:00
committed by Kevin Cunnane
parent 7ba14a3925
commit ac47fb84a8
4 changed files with 39 additions and 2 deletions

View File

@@ -913,6 +913,14 @@ class EditorWrapper extends ComponentWrapper implements sqlops.EditorComponent {
this.setProperty('isAutoResizable', v);
}
public get minimumHeight(): number {
return this.properties['minimumHeight'];
}
public set minimumHeight(v: number) {
this.setProperty('minimumHeight', v);
}
public get onContentChanged(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onDidChange);
return emitter && emitter.event;