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
712819e2
Commit
712819e2
authored
Jul 10, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep current selection when going into bipartite mode
parent
dba5a3c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
enviroment.js
twmain/enviroment.js
+14
-3
No files found.
twmain/enviroment.js
View file @
712819e2
...
@@ -376,7 +376,9 @@ function changeType(optionaltypeFlag) {
...
@@ -376,7 +376,9 @@ function changeType(optionaltypeFlag) {
sourceNids
=
TW
.
partialGraph
.
graph
.
nodes
().
map
(
function
(
n
){
return
n
.
id
})
sourceNids
=
TW
.
partialGraph
.
graph
.
nodes
().
map
(
function
(
n
){
return
n
.
id
})
}
}
let
targetNids
=
{}
let
targetNids
=
{}
if
(
!
mixedState
)
targetNids
=
getNeighbors
(
sourceNids
,
'XR'
)
if
(
!
mixedState
&&
outgoing
.
level
)
{
targetNids
=
getNeighbors
(
sourceNids
,
'XR'
)
}
else
{
else
{
// in mixed state we need to separate those already tgt state from others
// in mixed state we need to separate those already tgt state from others
let
alreadyOk
=
TW
.
partialGraph
.
graph
.
getNodesByType
(
typeFlag
)
let
alreadyOk
=
TW
.
partialGraph
.
graph
.
getNodesByType
(
typeFlag
)
...
@@ -385,7 +387,6 @@ function changeType(optionaltypeFlag) {
...
@@ -385,7 +387,6 @@ function changeType(optionaltypeFlag) {
let
needTransition
=
[]
let
needTransition
=
[]
for
(
var
i
in
sourceNids
)
{
for
(
var
i
in
sourceNids
)
{
let
nid
=
sourceNids
[
i
]
let
nid
=
sourceNids
[
i
]
console
.
log
(
'nid'
,
nid
)
if
(
alreadyOkLookup
[
nid
])
targetNids
[
nid
]
=
true
if
(
alreadyOkLookup
[
nid
])
targetNids
[
nid
]
=
true
else
needTransition
.
push
(
nid
)
else
needTransition
.
push
(
nid
)
}
}
...
@@ -413,7 +414,17 @@ function changeType(optionaltypeFlag) {
...
@@ -413,7 +414,17 @@ function changeType(optionaltypeFlag) {
// 5 - define the new selection
// 5 - define the new selection
let
newselsArr
=
[]
let
newselsArr
=
[]
if
(
outgoing
.
selectionNids
.
length
)
newselsArr
=
Object
.
keys
(
targetNids
)
if
(
outgoing
.
selectionNids
.
length
)
{
if
(
typeFlag
!=
'all'
)
{
newselsArr
=
Object
.
keys
(
targetNids
)
}
else
{
// not extending selection to all transitive neighbors
// makes the operation stable (when clicked several times,
// we extend slower towards transitive closure)
newselsArr
=
outgoing
.
selectionNids
}
}
// 6 - effect the changes on nodes
// 6 - effect the changes on nodes
...
...
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