Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
2fc18ac6
Commit
2fc18ac6
authored
Oct 06, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
on the way, better 'readd edge' logic
parent
bf66d4d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
45 deletions
+32
-45
enviroment.js
twmain/enviroment.js
+32
-45
No files found.
twmain/enviroment.js
View file @
2fc18ac6
...
...
@@ -1059,54 +1059,41 @@ function EdgeWeightFilter(sliderDivID , reltypestr , criteria) {
if
(
i
>=
low
&&
i
<=
high
)
{
if
(
addflag
)
{
// console.log("adding "+ids.join())
for
(
var
i
in
eids
)
{
let
eid
=
eids
[
i
]
if
(
TW
.
Edges
[
eid
])
TW
.
Edges
[
eid
].
lock
=
false
;
else
console
.
warn
(
"skipped missing eid"
,
eid
)
// local level case
// stepToIdsArr is full of edges that don't really exist at this point
// we need to distinguish between absent edges => keep them absent because of local
// and edges with hidden nodes => effect of a node slider => make them appear
if
(
!
present
.
level
)
{
// NB we assume the sigma convention eid = "nid1;nid2"
let
nidkeys
=
eid
.
split
(
';'
)
if
(
nidkeys
.
length
!=
2
)
{
console
.
error
(
"invalid edge id:"
+
eid
)
}
else
{
let
sid
=
nidkeys
[
0
]
let
tid
=
nidkeys
[
1
]
// if nodes not removed by local view
if
(
TW
.
partialGraph
.
graph
.
nodes
(
sid
)
&&
TW
.
partialGraph
.
graph
.
nodes
(
tid
))
{
if
(
TW
.
partialGraph
.
graph
.
nodes
(
sid
).
hidden
)
unHide
(
sid
)
if
(
TW
.
partialGraph
.
graph
.
nodes
(
tid
).
hidden
)
unHide
(
tid
)
if
(
!
TW
.
partialGraph
.
graph
.
edges
(
eid
))
{
add1Elem
(
eid
)
}
TW
.
partialGraph
.
graph
.
edges
(
eid
).
hidden
=
false
TW
.
Edges
[
eid
].
lock
=
false
;
}
}
// console.log("adding "+ids.join())
for
(
var
i
in
eids
)
{
let
eid
=
eids
[
i
]
// we need to distinguish between
// - absent edges
// => keep them absent because of local
// - edges with absent nodes
// => effect of a node slider => make them appear
let
e
=
TW
.
partialGraph
.
graph
.
edges
(
eid
)
if
(
e
)
{
let
nidkeys
=
eid
.
split
(
';'
)
if
(
nidkeys
.
length
!=
2
)
{
console
.
error
(
"invalid edge id:"
+
eid
)
}
// in any case we show the edge
// global level case
if
(
!
TW
.
partialGraph
.
graph
.
edges
(
eid
))
{
// legacy fallback shouldn't be necessary
add1Elem
(
eid
)
else
{
let
sid
=
nidkeys
[
0
]
let
tid
=
nidkeys
[
1
]
let
src
=
TW
.
partialGraph
.
graph
.
nodes
(
sid
)
let
tgt
=
TW
.
partialGraph
.
graph
.
nodes
(
tid
)
// if nothing is absent (nodes not
// removed by changetype or local view)
if
(
src
&&
tgt
)
{
// unhide in case nodeslider hid them
src
.
hidden
=
false
tgt
.
hidden
=
false
e
.
hidden
=
false
}
}
TW
.
partialGraph
.
graph
.
edges
(
eid
).
hidden
=
false
TW
.
Edges
[
eid
].
lock
=
false
;
}
}
}
}
}
else
{
if
(
delflag
)
{
for
(
var
i
in
eids
)
{
...
...
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