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
027bec85
Commit
027bec85
authored
1 year ago
by
AUBRY JEAN-PASCAL
Browse files
Options
Downloads
Patches
Plain Diff
feat: add MacroRugoRemous calculator definition
refs
#609
parent
e534eb43
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!252
release: version 4.18.0
,
!213
Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
Pipeline
#150463
passed
1 year ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/formulaire/definition/form-definition.ts
+4
-1
4 additions, 1 deletion
src/app/formulaire/definition/form-definition.ts
src/app/formulaire/definition/form-macrorugo-remous.ts
+30
-3
30 additions, 3 deletions
src/app/formulaire/definition/form-macrorugo-remous.ts
with
34 additions
and
4 deletions
src/app/formulaire/definition/form-definition.ts
+
4
−
1
View file @
027bec85
...
...
@@ -478,16 +478,19 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
// interface Observer
public
update
(
sender
:
any
,
data
:
any
)
{
console
.
log
(
"
test
"
)
if
(
sender
instanceof
Nub
)
{
switch
(
data
.
action
)
{
case
"
resultUpdated
"
:
console
.
log
(
"
test 1
"
);
// forward Nub results update notification to FormCompute objects
this
.
reaffectResultComponents
();
break
;
}
}
else
if
(
sender
instanceof
SessionSettings
)
{
// reset results if a session setting (max iterations, compute precision) has been modified
console
.
log
(
"
test 2
"
);
// reset results if a session setting (max iterations, compute precision) has bsseen modified
this
.
reset
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/formulaire/definition/form-macrorugo-remous.ts
+
30
−
3
View file @
027bec85
import
{
RemousResults
}
from
"
app/results/remous-results
"
;
import
{
acSection
,
CourbeRemous
,
CourbeRemousParams
,
MacroRugo
,
MacrorugoRemous
,
Props
,
Result
,
Session
}
from
"
jalhyd
"
;
import
{
MacrorugoRemousParams
}
from
"
jalhyd/build/internal_modules
"
;
import
{
IObservable
,
MacrorugoRemousParams
,
Nub
,
Verificateur
}
from
"
jalhyd/build/internal_modules
"
;
import
{
FormulaireFixedVar
}
from
"
./form-fixedvar
"
;
import
{
SelectField
}
from
"
../elements/select/select-field
"
;
export
class
FormulaireMacrorugoRemous
extends
FormulaireFixedVar
{
public
initNub
(
props
?:
Props
)
{
...
...
@@ -14,8 +15,7 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar {
}
}
if
(
pam
!==
undefined
)
{
// props.setPropValue(MacrorugoRemous.nubMacroRugo, pam.uid);
props
.
setPropValue
(
"
Q
"
,
pam
.
prms
.
Q
.
V
);
props
.
setPropValue
(
"
nubMacroRugo
"
,
pam
.
uid
);
}
return
super
.
initNub
(
props
);
}
...
...
@@ -79,6 +79,33 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar {
}
}
// interface Observer
// public update(sender: IObservable, data: any) {
// // copied from FormDefinition, to avoid calling super.update() that would trigger an unwanted this.refreshFieldsets();
// if (sender instanceof Nub) {
// switch (data.action) {
// case "resultUpdated":
// // forward Nub results update notification to FormCompute objects
// this.reaffectResultComponents();
// break;
// }
// }
// // copied from FormFixedVar, to avoid calling super.update()
// if (data.action === "propertyChange") {
// this.reset();
// }
// if (sender instanceof SelectField) {
// this.reset(); // reset results
// console.log("update", data.action)
// if (sender.id === "select_target_pam" && data.action === "select") {
// // update Verificateur property: Pass to check
// this._currentNub.setPropValue("nubToVerify", data.value ? data.value.value : undefined);
// }
// }
// }
public
resetFormResults
()
{
this
.
_remousResults
.
reset
();
this
.
updateCalcResults
();
...
...
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