Skip to content

Commit

Permalink
mka feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakae committed Jun 28, 2024
1 parent bbff8d2 commit baa8768
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions extension/src-context-table/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down Expand Up @@ -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:");
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit baa8768

Please sign in to comment.