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
ab293893
Commit
ab293893
authored
Jun 06, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST fixing changeType bugs
parent
979ab7d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
enviroment.js
tinawebJS/enviroment.js
+18
-19
No files found.
tinawebJS/enviroment.js
View file @
ab293893
...
...
@@ -242,21 +242,23 @@ function changeType() {
// for all possible nodes, which ones actually in the graph atm
for
(
var
i
in
TW
.
nodeIds
)
{
anode
=
TW
.
partialGraph
.
graph
.
nodes
(
TW
.
nodeIds
[
i
]);
let
nid
=
TW
.
nodeIds
[
i
]
let
anode
=
TW
.
partialGraph
.
graph
.
nodes
(
nid
);
if
(
anode
)
{
prevnodes
[
i
]
=
true
prevnodes
[
nid
]
=
true
}
}
var
links_sels
=
{}
for
(
var
i
in
TW
.
edgeIds
)
{
anedge
=
TW
.
partialGraph
.
graph
.
edges
(
TW
.
edgeIds
[
i
]);
let
eid
=
TW
.
edgeIds
[
i
]
let
anedge
=
TW
.
partialGraph
.
graph
.
edges
(
eid
);
if
(
anedge
)
{
prevedges
[
i
]
=
true
;
prevedges
[
eid
]
=
true
;
if
(
anedge
.
customAttrs
)
{
if
(
anedge
.
customAttrs
[
"grey"
]
==
0
)
{
links_sels
[
i
]
=
true
;
links_sels
[
eid
]
=
true
;
}
}
}
...
...
@@ -299,30 +301,28 @@ function changeType() {
var
newsels
=
{}
var
sumpastcat
=
t0Activetypes
.
map
(
Number
).
reduce
(
function
(
a
,
b
){
return
a
+
b
;})
if
(
sumpastcat
==
1
)
/* change to alter comp*/
{
for
(
var
i
in
prevnodes
)
{
s
=
i
;
neigh
=
TW
.
Relations
[
str_nextState
][
s
]
for
(
var
nid
in
prevnodes
)
{
let
neigh
=
TW
.
Relations
[
str_nextState
][
nid
]
if
(
neigh
)
{
for
(
var
j
in
neigh
)
{
t
=
neigh
[
j
]
nodes_2_colour
[
t
]
=
true
;
let
tid
=
neigh
[
j
]
nodes_2_colour
[
t
id
]
=
true
;
}
}
}
for
(
var
i
in
nodes_2_colour
)
{
s
=
i
;
neigh
=
TW
.
Relations
[
t1ActivetypesKey
][
s
]
for
(
var
nid
in
nodes_2_colour
)
{
let
neigh
=
TW
.
Relations
[
t1ActivetypesKey
][
nid
]
if
(
neigh
)
{
for
(
var
j
in
neigh
)
{
t
=
neigh
[
j
]
if
(
nodes_2_colour
[
t
])
{
edges_2_colour
[
s
+
";"
+
t
]
=
true
;
edges_2_colour
[
t
+
";"
+
s
]
=
true
;
let
tid
=
neigh
[
j
]
if
(
nodes_2_colour
[
t
id
])
{
edges_2_colour
[
nid
+
";"
+
tid
]
=
true
;
edges_2_colour
[
t
id
+
";"
+
nid
]
=
true
;
}
}
}
nodes_2_colour
[
i
]
=
false
;
nodes_2_colour
[
nid
]
=
false
;
}
for
(
var
nid
in
nodes_2_colour
)
...
...
@@ -429,7 +429,6 @@ function changeType() {
add1Elem
(
eid
)
}
// to recreate the selection in the new type graph
TW
.
instance
.
selNgn
.
MultipleSelection2
({
nodes
:
sels
,
...
...
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