Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
5ece8826
Commit
5ece8826
authored
2 years ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
refactor: remove NgParam.unit member
refs
#501
parent
affc3e2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!141
Resolve "PréBarrages: les valeurs erronées ne sont pas conservées"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/formulaire/elements/ngparam.ts
+5
-4
5 additions, 4 deletions
src/app/formulaire/elements/ngparam.ts
with
5 additions
and
4 deletions
src/app/formulaire/elements/ngparam.ts
+
5
−
4
View file @
5ece8826
...
...
@@ -32,8 +32,6 @@ export class NgParameter extends InputField implements Observer {
/** set to true to disable UI validation on this input */
private
_allowEmpty
=
false
;
public
unit
:
string
;
public
radioConfig
:
ParamRadioConfig
;
public
disabled
:
boolean
;
...
...
@@ -207,6 +205,10 @@ export class NgParameter extends InputField implements Observer {
return
this
.
_paramDef
.
valueMode
;
}
public
get
unit
()
{
return
this
.
_paramDef
.
unit
;
}
/**
* Unlinks the parameter and updates its value when value mode changes
*/
...
...
@@ -496,7 +498,7 @@ export class NgParameter extends InputField implements Observer {
if
(
this
.
_paramDef
.
symbol
===
rep
.
prmDef
.
symbol
)
{
this
.
_paramDef
.
loadObjectRepresentation
(
rep
.
prmDef
);
this
.
_allowEmpty
=
rep
.
allowEmpty
;
this
.
unit
=
rep
.
unit
;
this
.
_paramDef
.
setUnit
(
rep
.
unit
)
;
this
.
radioConfig
=
rep
.
radioConfig
;
}
}
...
...
@@ -581,7 +583,6 @@ export class NgParameter extends InputField implements Observer {
if
(
json
[
"
allowEmpty
"
]
!==
undefined
&&
typeof
json
[
"
allowEmpty
"
]
===
"
boolean
"
)
{
this
.
_allowEmpty
=
json
[
"
allowEmpty
"
];
}
this
.
unit
=
this
.
paramDefinition
.
unit
;
this
.
radioConfig
=
this
.
getRadioConfig
();
if
(
json
[
"
calculable
"
]
!==
undefined
&&
json
[
"
calculable
"
]
===
false
)
{
this
.
radioConfig
=
Math
.
min
(
ParamCalculability
.
FREE
,
this
.
getRadioConfig
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment