Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
jalhyd
Commits
05990896
Commit
05990896
authored
Nov 15, 2019
by
Mathias Chouet
🍝
Browse files
ParamDefinition: save initial value for dicho calculated params
parent
c8a13b42
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/param/param-definition.ts
View file @
05990896
...
...
@@ -772,6 +772,13 @@ export class ParamDefinition implements INamedIterableValues, IObservable {
paramRep
.
value
=
this
.
singleValue
;
break
;
case
ParamValueMode
.
CALCUL
:
// save initial value if param is calculated using dichotomy
if
(
this
.
calculability
===
ParamCalculability
.
DICHO
)
{
paramRep
.
value
=
this
.
singleValue
;
}
break
;
case
ParamValueMode
.
MINMAX
:
paramRep
.
min
=
this
.
min
;
paramRep
.
max
=
this
.
max
;
...
...
@@ -874,6 +881,9 @@ export class ParamDefinition implements INamedIterableValues, IObservable {
case
ParamValueMode
.
CALCUL
:
// although calculated param is set at Nub level (see below),
// it is detected as "the only parameter in CALC mode"
if
(
obj
.
value
!==
undefined
)
{
// dichotomy params have an initial value, others don't
this
.
singleValue
=
obj
.
value
;
}
ret
.
calculated
=
true
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment