From baa8768750e589ad32134df77885cb8d1039803d Mon Sep 17 00:00:00 2001 From: Jette Petzold Date: Fri, 28 Jun 2024 10:40:13 +0200 Subject: [PATCH] mka feedback --- extension/src-context-table/main.ts | 10 +++++++--- extension/src/extension.ts | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extension/src-context-table/main.ts b/extension/src-context-table/main.ts index e2a0c79..0ddef1d 100644 --- a/extension/src-context-table/main.ts +++ b/extension/src-context-table/main.ts @@ -47,6 +47,10 @@ export class ContextTable extends Table { protected typeSelectorId = "select_type"; protected tableId = "context_table"; + /** Offsets for the selectors */ + protected selectorControlActionOffset = { top: "13px", left: "170px" }; + protected selectorTypeOffset = { top: "43px", left: "115px" }; + // data of the table protected rules: ContextTableRule[] = []; protected controlActions: ContextTableControlAction[] = []; @@ -128,7 +132,7 @@ export class ContextTable extends Table { if (mainDiv) { // Create text and selector element for selecting a control action addText(mainDiv, "Choose a Control Action:"); - addSelector(mainDiv, this.actionSelectorId, 0, [], "13px", "170px"); + addSelector(mainDiv, this.actionSelectorId, 0, [], this.selectorControlActionOffset.top, this.selectorControlActionOffset.left); // Create text and selector element for selecting the action type addText(mainDiv, "Choose a Type:"); @@ -137,8 +141,8 @@ export class ContextTable extends Table { this.typeSelectorId, this.selectedType, ["provided", "not provided", "both"], - "43px", - "115px" + this.selectorTypeOffset.top, + this.selectorTypeOffset.left ); // add listener diff --git a/extension/src/extension.ts b/extension/src/extension.ts index dfb03b4..fc0cf54 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -347,13 +347,13 @@ async function updateViews(manager: StpaLspVscodeExtension, document: vscode.Tex } // update diagram without reseting viewport - const mes: ActionMessage = { + const message: ActionMessage = { clientId: manager.clientId!, action: { kind: UpdateDiagramAction.KIND, } as UpdateDiagramAction, }; - languageClient.sendNotification(acceptMessageType, mes); + languageClient.sendNotification(acceptMessageType, message); // update the context table if (manager.contextTable) {