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
2390499f
Commit
2390499f
authored
Apr 12, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix re-add edges when in 'local' level
parent
a7b2f9e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
24 deletions
+44
-24
enviroment.js
tinawebJS/enviroment.js
+40
-24
methods.js
tinawebJS/methods.js
+4
-0
No files found.
tinawebJS/enviroment.js
View file @
2390499f
...
@@ -538,7 +538,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -538,7 +538,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
if
(
filtervalue
!=
lastFilter
[
sliderDivID
][
"last"
])
{
if
(
filtervalue
!=
lastFilter
[
sliderDivID
][
"last"
])
{
//
? new sigma js: can't port this line because usage unclear ?
//
TODO memoize the last filter value
// $.doTimeout(sliderDivID+"_"+lastFilter[sliderDivID]["last"]);
// $.doTimeout(sliderDivID+"_"+lastFilter[sliderDivID]["last"]);
...
@@ -584,37 +584,53 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -584,37 +584,53 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
}
}
// do the important stuff
// do the important stuff
// ex iterarr [0:0, 1:1...]
// ex finalarray [0: [eid1,eid2], 1:[eid3,eid4,eid5]...]
for
(
var
c
in
iterarr
)
{
for
(
var
c
in
iterarr
)
{
var
i
=
iterarr
[
c
];
var
i
=
iterarr
[
c
];
ids
=
finalarray
[
i
]
var
e
ids
=
finalarray
[
i
]
if
(
i
>=
low
&&
i
<=
high
)
{
if
(
i
>=
low
&&
i
<=
high
)
{
if
(
addflag
)
{
if
(
addflag
)
{
// console.log("adding "+ids.join())
// console.log("adding "+ids.join())
for
(
var
i
d
in
ids
)
{
for
(
var
i
in
e
ids
)
{
ID
=
ids
[
id
]
let
eid
=
eids
[
i
]
TW
.
Edges
[
ID
].
lock
=
false
;
TW
.
Edges
[
eid
].
lock
=
false
;
// global level case
if
(
present
.
level
)
{
if
(
present
.
level
)
{
// console.log("\tADD "+
ID
)
// console.log("\tADD "+
eid
)
// n =
ID
.split(";")
// n =
eid
.split(";")
// if(n.length>1)
// if(n.length>1)
// console.log("\t\tsource:("+TW.Nodes[n[0]].x+","+TW.Nodes[n[0]].y+") ||| target:("+TW.Nodes[n[1]].x+","+TW.Nodes[n[1]].y+")")
// console.log("\t\tsource:("+TW.Nodes[n[0]].x+","+TW.Nodes[n[0]].y+") ||| target:("+TW.Nodes[n[1]].x+","+TW.Nodes[n[1]].y+")")
add1Elem
(
ID
)
add1Elem
(
eid
)
}
else
{
}
// this fragment broken
console
.
error
(
"TODO Unimplemented after port to 1.2"
)
// for (var n in TW.partialGraph._core.graph.nodesIndex) {
// local level case
// sid = TW.Edges[ID].sourceID
// finalarray is full of edges that don't really exist at this point
// tid = TW.Edges[ID].targetID
else
{
// if (sid==n || tid==n) {
// if(TW.partialGraph.graph.nodes(sid).hidden) unHide(sid)
// NB we assume the sigma convention eid = "nid1;nid2"
// if(TW.partialGraph.graph.nodes(tid).hidden) unHide(tid)
let
nidkeys
=
eid
.
split
(
';'
)
// add1Elem(ID)
// console.log(nidkeys)
// // console.log("\tADD "+ID)
// }
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
)
add1Elem
(
eid
)
}
}
}
}
}
}
...
@@ -623,8 +639,8 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -623,8 +639,8 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
}
else
{
}
else
{
if
(
delflag
)
{
if
(
delflag
)
{
// console.log("deleting "+ids.join())
// console.log("deleting "+ids.join())
for
(
var
i
d
in
ids
)
{
for
(
var
i
in
e
ids
)
{
ID
=
ids
[
id
]
ID
=
eids
[
i
]
if
(
!
isUndef
(
TW
.
partialGraph
.
graph
.
edges
(
ID
)))
{
if
(
!
isUndef
(
TW
.
partialGraph
.
graph
.
edges
(
ID
)))
{
var
t0
=
performance
.
now
()
var
t0
=
performance
.
now
()
TW
.
partialGraph
.
graph
.
dropEdge
(
ID
)
TW
.
partialGraph
.
graph
.
dropEdge
(
ID
)
...
@@ -673,7 +689,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -673,7 +689,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
theHtml
.
classList
.
remove
(
'waiting'
)
theHtml
.
classList
.
remove
(
'waiting'
)
},
20
)
},
20
)
},
100
)
//
debounce timeout
},
700
)
// large-ish
debounce timeout
...
...
tinawebJS/methods.js
View file @
2390499f
...
@@ -575,6 +575,10 @@ function graphTagCloudElem(nodes) {
...
@@ -575,6 +575,10 @@ function graphTagCloudElem(nodes) {
}
}
function
unHide
(
nodeId
)
{
TW
.
partialGraph
.
graph
.
nodes
(
nodeId
).
hidden
=
false
}
// edges greyish color for unselected, when we have a selection
// edges greyish color for unselected, when we have a selection
// case default: color is precomputed as node true_color + alpha .5
// case default: color is precomputed as node true_color + alpha .5
// cases when coloredBy (ex: centrality): color must be recomputed here
// cases when coloredBy (ex: centrality): color must be recomputed here
...
...
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