Skip to content

Commit

Permalink
fix for #1561 (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
joswig authored Dec 6, 2024
1 parent a3d2612 commit aab60d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 9 additions & 5 deletions src/components/sequencing/form/ArgTitle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
let title: string = '';
let typeInfo: string = '';
let formattedRange: string = '';
let isSymbolAllowed: boolean = true;
$: typeInfo = compactType(argDef);
$: title = getArgTitle(argDef, typeInfo);
$: formattedRange = formatRange(argDef);
$: isSymbolAllowed = !isFswCommandArgumentRepeat(argDef);
function compactType(argDef: FswCommandArgument): string {
if (isFswCommandArgumentUnsigned(argDef)) {
Expand Down Expand Up @@ -96,12 +98,14 @@
</div>
{/if}

<div>Value Type</div>
{#if isSymbolAllowed}
<div>Value Type</div>

<select class="st-select" required bind:value={argumentValueCategory} on:change={onValueTypeChange}>
<option value="Literal"> Literal </option>
<option value="Symbol"> Symbol </option>
</select>
<select class="st-select" required bind:value={argumentValueCategory} on:change={onValueTypeChange}>
<option value="Literal"> Literal </option>
<option value="Symbol"> Symbol </option>
</select>
{/if}
</div>
</Collapse>

Expand Down
3 changes: 1 addition & 2 deletions src/components/sequencing/form/EnumEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<script lang="ts">
import type { CommandDictionary, FswCommandArgumentEnum } from '@nasa-jpl/aerie-ampcs';
import type { SelectedDropdownOptionValue } from '../../../types/dropdown';
import { quoteEscape } from '../../../utilities/codemirror/codemirror-utils';
import SearchableDropdown from '../../ui/SearchableDropdown.svelte';
const SEARCH_THRESHOLD = 100;
Expand Down Expand Up @@ -31,7 +30,7 @@
function onSelectReferenceModel(event: CustomEvent<SelectedDropdownOptionValue>) {
const { detail: enumVal } = event;
if (typeof enumVal === 'string') {
setInEditor(quoteEscape(enumVal));
setInEditor(enumVal);
}
}
</script>
Expand Down

0 comments on commit aab60d8

Please sign in to comment.