Skip to content

Commit

Permalink
Fix #543
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Jan 5, 2024
1 parent 8acf9cb commit ea22119
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ class StartClassGroup extends HTMLComponent {
getDefaultLblVar(){
return this.defaultLblVar?.variable
}

/**
* @returns true if the 'eye' icon on this arrow is selected
*/
isVarSelected() {
return this.inputSelector?.selectViewVariableBtn?.selected;
}

#setDefaultLblVar(name:string){
this.defaultLblVar.variable = `${name}_label`
}
Expand Down
5 changes: 3 additions & 2 deletions src/sparnatural/statehandling/actions/UpdateVarList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export function updateVarList(actionStore: ActionStore) {
let startGrp = grpWrapper.CriteriaGroup.StartClassGroup;
let endGrp = grpWrapper.CriteriaGroup.EndClassGroup;
//always remove the '?' as the first char
if(startGrp.getVarName()) varNames.add(startGrp.getVarName()?.slice(1));
if(endGrp.getVarName()) varNames.add(endGrp.getVarName()?.slice(1));
if(startGrp.isVarSelected() && startGrp.getVarName()) varNames.add(startGrp.getVarName()?.slice(1));
if(endGrp.isVarSelected() && endGrp.getVarName()) varNames.add(endGrp.getVarName()?.slice(1));
}
);
console.dir(varNames);
updateDraggables(actionStore, varNames);
actionStore.variables = [...varNames];
}
Expand Down

0 comments on commit ea22119

Please sign in to comment.