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
ebe60432
Commit
ebe60432
authored
Nov 03, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changetomeso for monographs
parent
9e96eeda
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
15 deletions
+66
-15
main.js
tinawebJS/js/main.js
+2
-1
methods.js
tinawebJS/js/methods.js
+41
-2
sigma.parseCustom.js
tinawebJS/js/sigma.parseCustom.js
+23
-12
No files found.
tinawebJS/js/main.js
View file @
ebe60432
...
@@ -31,7 +31,8 @@ if (mainfile) {
...
@@ -31,7 +31,8 @@ if (mainfile) {
}
else
{
}
else
{
window
.
location
.
href
=
window
.
location
.
origin
+
window
.
location
.
pathname
+
"?file="
+
mainfile
;
window
.
location
.
href
=
window
.
location
.
origin
+
window
.
location
.
pathname
+
"?file="
+
mainfile
;
}
}
}
else
{
}
//url-mode
else
{
if
(
isUndef
(
getUrlParam
.
nodeidparam
))
{
if
(
isUndef
(
getUrlParam
.
nodeidparam
))
{
pr
(
"do nothing, 'cause don't wanna"
);
pr
(
"do nothing, 'cause don't wanna"
);
...
...
tinawebJS/js/methods.js
View file @
ebe60432
...
@@ -1203,6 +1203,43 @@ function createEdgesForExistingNodes (typeOfNodes) {
...
@@ -1203,6 +1203,43 @@ function createEdgesForExistingNodes (typeOfNodes) {
existingNodes
=
partialGraph
.
_core
.
graph
.
nodes
;
existingNodes
=
partialGraph
.
_core
.
graph
.
nodes
;
if
(
categoriesIndex
.
length
==
1
)
{
var
pairdict
=
{}
for
(
var
n
in
existingNodes
)
{
ID
=
existingNodes
[
n
].
id
;
vois
=
nodes1
[
ID
].
neighbours
;
for
(
var
v
in
vois
)
{
pair
=
[
parseInt
(
ID
)
,
parseInt
(
vois
[
v
])
].
sort
(
compareNumbers
)
pairdict
[
pair
[
0
]
+
";"
+
pair
[
1
]
]
=
1
}
}
for
(
var
e
in
pairdict
)
{
edge
=
""
;
if
(
isUndef
(
Edges
[
e
]))
{
E
=
e
.
split
(
";"
)
edge
=
E
[
1
]
+
";"
+
E
[
0
];
}
else
edge
=
e
;
E
=
edge
.
split
(
";"
)
if
(
getn
(
E
[
0
])
&&
getn
(
E
[
1
])
)
unHide
(
edge
)
// pr("antes:"+e+"\t|\tdespues:"+edge)
// pr("\t\t\t\t\t----- decision final "+edge)
// unHide(edge)
}
return
;
}
if
(
typeOfNodes
==
"Bipartite"
){
if
(
typeOfNodes
==
"Bipartite"
){
for
(
i
=
0
;
i
<
existingNodes
.
length
;
i
++
){
for
(
i
=
0
;
i
<
existingNodes
.
length
;
i
++
){
for
(
j
=
0
;
j
<
existingNodes
.
length
;
j
++
){
for
(
j
=
0
;
j
<
existingNodes
.
length
;
j
++
){
...
@@ -1427,6 +1464,7 @@ function unHideElem(id){
...
@@ -1427,6 +1464,7 @@ function unHideElem(id){
}
}
function
changeToMeso
(
iwannagraph
)
{
function
changeToMeso
(
iwannagraph
)
{
labels
=
[]
labels
=
[]
iwantograph
=
iwannagraph
;
//just a mess
iwantograph
=
iwannagraph
;
//just a mess
...
@@ -1434,6 +1472,7 @@ function changeToMeso(iwannagraph) {
...
@@ -1434,6 +1472,7 @@ function changeToMeso(iwannagraph) {
partialGraph
.
emptyGraph
();
partialGraph
.
emptyGraph
();
pr
(
"changing to Meso-"
+
iwannagraph
);
pr
(
"changing to Meso-"
+
iwannagraph
);
if
(
iwannagraph
==
"social"
)
{
if
(
iwannagraph
==
"social"
)
{
if
(
!
is_empty
(
selections
)){
if
(
!
is_empty
(
selections
)){
// hideEverything();
// hideEverything();
...
@@ -1464,11 +1503,10 @@ function changeToMeso(iwannagraph) {
...
@@ -1464,11 +1503,10 @@ function changeToMeso(iwannagraph) {
}
}
}
}
}
}
for
(
var
Nk
in
finalnodes
)
unHide
(
Nk
);
for
(
var
Nk
in
finalnodes
)
unHide
(
Nk
);
createEdgesForExistingNodes
(
iwannagraph
);
/**/
createEdgesForExistingNodes
(
iwannagraph
);
/**/
}
}
if
(
swclickPrev
==
"semantic"
)
{
if
(
swclickPrev
==
"semantic"
)
{
var
finalnodes
=
{}
var
finalnodes
=
{}
...
@@ -1494,6 +1532,7 @@ function changeToMeso(iwannagraph) {
...
@@ -1494,6 +1532,7 @@ function changeToMeso(iwannagraph) {
for
(
var
Nk
in
finalnodes
)
unHide
(
Nk
);
for
(
var
Nk
in
finalnodes
)
unHide
(
Nk
);
createEdgesForExistingNodes
(
iwannagraph
);
/**/
createEdgesForExistingNodes
(
iwannagraph
);
/**/
}
}
if
(
swclickPrev
==
"sociosemantic"
)
{
if
(
swclickPrev
==
"sociosemantic"
)
{
var
finalnodes
=
{}
var
finalnodes
=
{}
...
...
tinawebJS/js/sigma.parseCustom.js
View file @
ebe60432
...
@@ -259,30 +259,41 @@ function onepartiteExtract(){
...
@@ -259,30 +259,41 @@ function onepartiteExtract(){
val
:
val
val
:
val
});
});
}
}
edge
.
label
=
"nodes1"
;
edge
.
label
=
"nodes1"
;
if
(
(
typeof
nodes1
[
source
])
==
"undefined"
){
if
(
isUndef
(
nodes1
[
source
])
){
nodes1
[
source
]
=
{
nodes1
[
source
]
=
{
label
:
Nodes
[
source
].
label
,
label
:
Nodes
[
source
].
label
,
neighbours
:
[]
neighbours
:
[],
neighboursIndex
:
{}
};
};
nodes1
[
source
].
neighbours
.
push
(
target
);
nodes1
[
source
].
neighboursIndex
[
target
]
=
1
;
}
else
nodes1
[
source
].
neighbours
.
push
(
target
);
}
else
nodes1
[
source
].
neighboursIndex
[
target
]
=
1
;
if
((
typeof
nodes1
[
target
])
==
"undefined"
){
if
(
isUndef
(
nodes1
[
target
])
){
nodes1
[
target
]
=
{
nodes1
[
target
]
=
{
label
:
Nodes
[
target
].
label
,
label
:
Nodes
[
target
].
label
,
neighbours
:
[]
neighbours
:
[],
neighboursIndex
:
{}
};
};
nodes1
[
target
].
neighbours
.
push
(
source
);
nodes1
[
target
].
neighboursIndex
[
source
]
=
1
;
}
else
nodes1
[
target
].
neighbours
.
push
(
source
);
}
else
nodes1
[
target
].
neighboursIndex
[
source
]
=
1
;
Edges
[
indice
]
=
edge
;
Edges
[
indice
]
=
edge
;
if
(
(
typeof
partialGraph
.
_core
.
graph
.
edgesIndex
[
target
+
";"
+
source
])
==
"undefined"
){
if
(
isUndef
(
gete
([
target
+
";"
+
source
]))
)
partialGraph
.
addEdge
(
indice
,
source
,
target
,
edge
);
partialGraph
.
addEdge
(
indice
,
source
,
target
,
edge
);
}
}
}
}
}
for
(
var
n
in
nodes1
)
{
nodes1
[
n
].
neighbours
=
Object
.
keys
(
nodes1
[
n
].
neighboursIndex
)
nodes1
[
n
].
neighboursIndex
=
null
;
delete
nodes1
[
n
].
neighboursIndex
}
}
}
function
fullExtract
(){
function
fullExtract
(){
var
i
,
j
,
k
;
var
i
,
j
,
k
;
// Parse Attributes
// Parse Attributes
...
...
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