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
daa08194
Commit
daa08194
authored
Sep 23, 2020
by
Mathias Chouet
🍝
Browse files
Fix
#269
- expose links in PreBarrage, add spec
parent
a38a55a7
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
spec/pre_barrage/pre-barrage.spec.ts
View file @
daa08194
This diff is collapsed.
Click to expand it.
src/nub.ts
View file @
daa08194
...
...
@@ -701,8 +701,14 @@ export abstract class Nub extends ComputeNode implements IObservable {
// If parameter comes from the same Nub, its parent or any of its children,
// no linking is possible at all.
// Different Structures in the same parent can get linked to each other.
if
(
!
this
.
isParentOrChildOf
(
src
.
nubUid
))
{
if
(
!
this
.
isParentOrChildOf
(
src
.
nubUid
)
&&
(
// check grand-parent for PreBarrage special case @TODO find a generic way
// to perform both tests (synthesise .nubUid and .originNub.uid)
!
(
this
.
_calcType
===
CalculatorType
.
PreBarrage
)
||
!
this
.
isParentOrChildOf
(
src
.
originNub
.
uid
)
)
)
{
// 1. own parameters
for
(
const
p
of
this
.
_prms
)
{
// if symbol and Nub type are identical
...
...
@@ -782,8 +788,8 @@ export abstract class Nub extends ComputeNode implements IObservable {
}
}
// 3. children Nubs, except for PAB and MRC
if
(
!
(
this
instanceof
Pab
||
this
instanceof
MacrorugoCompound
))
{
// 3. children Nubs, except for PAB and MRC
and PreBarrage
if
(
!
(
this
instanceof
Pab
||
this
instanceof
MacrorugoCompound
||
this
.
_calcType
===
CalculatorType
.
PreBarrage
))
{
for
(
const
cn
of
this
.
getChildren
())
{
res
=
res
.
concat
(
cn
.
getLinkableValues
(
src
));
}
...
...
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