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
6a3a0735
Commit
6a3a0735
authored
Sep 16, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OK: alpha colors when hover
parent
5a60b0d9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
27 deletions
+48
-27
methods.js
tinawebJS/js/methods.js
+4
-26
sigmaUtils.js
tinawebJS/js/sigmaUtils.js
+43
-0
zearcher.sh
zearcher.sh
+1
-1
No files found.
tinawebJS/js/methods.js
View file @
6a3a0735
...
...
@@ -688,7 +688,10 @@ function greyEverything(){
for
(
var
i
in
nds
){
if
(
!
nds
[
i
].
attr
[
'grey'
]){
nds
[
i
].
attr
[
'true_color'
]
=
nds
[
i
].
color
;
nds
[
i
].
color
=
greyColor
;
// pr(nds[i].color)
alphacol
=
"rgba("
+
hex2rga
(
nds
[
i
].
color
)
+
",0.5)"
;
nds
[
i
].
color
=
alphacol
;
// nds[i].color = "rgba("+hex2rga(nds[i].color)+",0.5)"
}
nds
[
i
].
attr
[
'grey'
]
=
1
;
}
...
...
@@ -734,31 +737,6 @@ function markAsSelected(n_id,sel) {
neigh
=
nodes1
[
nodeSel
.
id
].
neighbours
;
/**/
for
(
var
i
in
neigh
){
// nodeVec = partialGraph._core.graph.nodesIndex[neigh[i]];
// // vec.color = vec.attr['true_color'];
// // vec.attr['grey'] = 0;
// // pr("nodeselected: "+nodeSel.id+"\t"+nodeSel.label+"\t\t||\t\tvecino: "+vec.id+"\t"+vec.label)
// possibledge1 = partialGraph._core.graph.edgesIndex[nodeVec.id+";"+nodeSel.id]
// possibledge2 = partialGraph._core.graph.edgesIndex[nodeSel.id+";"+nodeVec.id]
// an_edge = (!isUndef(possibledge1))?possibledge1:possibledge2;
// if(!isUndef(an_edge) && !an_edge.hidden) {
// //highlight node
// nodeVec.hidden = false;
// nodeVec.color = nodeVec.attr['true_color'];
// nodeVec.attr['grey'] = 0;
// //highlight edge
// an_edge.color = an_edge.attr['true_color'];
// an_edge.attr['grey'] = 0;
// }
// if (NOW=="a" || NOW=="b" && nodeVec.color==greyColor)
// nodeVec.hidden = true
vec
=
partialGraph
.
_core
.
graph
.
nodesIndex
[
neigh
[
i
]];
vec
.
color
=
vec
.
attr
[
'true_color'
];
vec
.
attr
[
'grey'
]
=
0
;
...
...
tinawebJS/js/sigmaUtils.js
View file @
6a3a0735
...
...
@@ -195,3 +195,46 @@ function clustersBy(daclass) {
partialGraph
.
refresh
()
partialGraph
.
draw
();
}
function
hex2rga
(
sent_hex
)
{
result
=
[]
hex
=
(
sent_hex
.
charAt
(
0
)
===
"#"
?
sent_hex
.
substr
(
1
)
:
sent_hex
);
// check if 6 letters are provided
if
(
hex
.
length
===
6
)
{
result
=
calculateFull
(
hex
);
return
result
;
}
else
if
(
hex
.
length
===
3
)
{
result
=
calculatePartial
(
hex
);
return
result
;
}
}
function
calculateFull
(
hex
)
{
var
r
=
parseInt
(
hex
.
substring
(
0
,
2
),
16
);
var
g
=
parseInt
(
hex
.
substring
(
2
,
4
),
16
);
var
b
=
parseInt
(
hex
.
substring
(
4
,
6
),
16
);
// set results
// pr( "r:"+r)
// pr( "g:"+g)
// pr( "b:"+b)
// pr("")
return
[
r
,
g
,
b
];
}
// function for calculating 3 letters hex value
function
calculatePartial
(
hex
)
{
var
r
=
parseInt
(
hex
.
substring
(
0
,
1
)
+
hex
.
substring
(
0
,
1
),
16
);
var
g
=
parseInt
(
hex
.
substring
(
1
,
2
)
+
hex
.
substring
(
1
,
2
),
16
);
var
b
=
parseInt
(
hex
.
substring
(
2
,
3
)
+
hex
.
substring
(
2
,
3
),
16
);
// set results
// pr( "r:"+r)
// pr( "g:"+g)
// pr( "b:"+b)
// pr("")
return
[
r
,
g
,
b
];
}
\ No newline at end of file
zearcher.sh
View file @
6a3a0735
...
...
@@ -31,7 +31,7 @@ function test2 {
for
f
in
$iter
do
filename
=
`
echo
$f
|
sed
s/
"
\.\/
"
//g
`
variable
=
`
cat
$filename
|
grep
"
edgesTF
"
`
variable
=
`
cat
$filename
|
grep
"
greyColor
"
`
if
[[
"
$variable
"
!=
""
]]
then
echo
$filename
...
...
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