mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 17:22:55 -05:00
Support position property in editor component (#2314)
* Support position property in editor component - This needs to be set directly on the editor component so cannot just use CSSStyles feature - Given its importance to this scenario, it also warrants a dedicated property. * Fix window resize when action bar clicked * Renamed per Abbie's suggestion * Changed name to clarify the comments
This commit is contained in:
@@ -79,7 +79,8 @@ export class ModelViewEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
private doUpdateContainer() {
|
||||
const modelViewContainer = this.input && (this.input as ModelViewInput).container;
|
||||
let modelViewInput = this.input as ModelViewInput;
|
||||
const modelViewContainer = modelViewInput && modelViewInput.container;
|
||||
if (modelViewContainer) {
|
||||
const frameRect = this._editorFrame.getBoundingClientRect();
|
||||
const containerRect = modelViewContainer.parentElement.getBoundingClientRect();
|
||||
@@ -89,6 +90,9 @@ export class ModelViewEditor extends BaseEditor {
|
||||
modelViewContainer.style.left = `${frameRect.left - containerRect.left}px`;
|
||||
modelViewContainer.style.width = `${frameRect.width}px`;
|
||||
modelViewContainer.style.height = `${frameRect.height}px`;
|
||||
if (modelViewInput.dialogPane) {
|
||||
modelViewInput.dialogPane.layout(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user