Skip to content
Snippets Groups Projects
Commit 7398a7ba authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Sort parameters referred by a variable to ensure that non-Node parameters are...

Sort parameters referred by a variable to ensure that non-Node parameters are before Node parameters.
parent b33ea443
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
{#if parameter.children !== undefined}
<ul>
{#each Object.values(parameter.children) as child}
{#each Object.values(parameter.children).sort( (child1, child2) => (child1.class === child2.class || (child1.class !== ParameterClass.Node && child2.class !== ParameterClass.Node) ? child1.title.localeCompare(child2.title) : child1.class === ParameterClass.Node ? 1 : -1), ) as child}
<li>
{#if child.class === ParameterClass.Node}
<svelte:self {date} depth={depth + 1} parameter={child} />
......
......@@ -247,7 +247,7 @@
{#if openAllParameters}
<ul>
{#each Object.values(rootParameterById) as parameter}
{#each Object.values(rootParameterById).sort( (parameter1, parameter2) => (parameter1.class === parameter2.class || (parameter1.class !== ParameterClass.Node && parameter2.class !== ParameterClass.Node) ? parameter1.title.localeCompare(parameter2.title) : parameter1.class === ParameterClass.Node ? 1 : -1), ) as parameter}
<li>
{#if parameter.class === ParameterClass.Node}
<VariableReferredNodeParameter {date} depth={0} {parameter} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment