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
4a2a92f3
Commit
4a2a92f3
authored
Sep 10, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup before restruct
parent
8ba35897
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
9 deletions
+66
-9
FA2.js
FA2.js
+20
-6
enviroment.js
tinawebJS/js/enviroment.js
+2
-0
main.js
tinawebJS/js/main.js
+35
-1
sigma.parseCustom.js
tinawebJS/js/sigma.parseCustom.js
+2
-1
sigmaUtils.js
tinawebJS/js/sigmaUtils.js
+7
-1
No files found.
FA2.js
View file @
4a2a92f3
...
@@ -60,7 +60,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -60,7 +60,7 @@ var ForceAtlas2 = function(graph) {
switch
(
self
.
state
.
step
)
{
switch
(
self
.
state
.
step
)
{
case
0
:
// Pass init
case
0
:
// Pass init
// Initialise layout data
// Initialise layout data
// pr("caso 0")
// pr("caso 0")
nodes
.
forEach
(
function
(
n
)
{
nodes
.
forEach
(
function
(
n
)
{
if
(
n
.
fa2
)
{
if
(
n
.
fa2
)
{
n
.
fa2
.
mass
=
1
+
n
.
degree
;
n
.
fa2
.
mass
=
1
+
n
.
degree
;
...
@@ -99,7 +99,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -99,7 +99,7 @@ var ForceAtlas2 = function(graph) {
break
;
break
;
case
1
:
// Repulsion
case
1
:
// Repulsion
// pr("caso 1")
// pr("caso 1")
var
Repulsion
=
self
.
ForceFactory
.
buildRepulsion
(
var
Repulsion
=
self
.
ForceFactory
.
buildRepulsion
(
self
.
p
.
adjustSizes
,
self
.
p
.
adjustSizes
,
self
.
p
.
scalingRatio
self
.
p
.
scalingRatio
...
@@ -144,7 +144,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -144,7 +144,7 @@ var ForceAtlas2 = function(graph) {
break
;
break
;
case
2
:
// Gravity
case
2
:
// Gravity
// pr("caso 2")
// pr("caso 2")
var
Gravity
=
(
self
.
p
.
strongGravityMode
)
?
var
Gravity
=
(
self
.
p
.
strongGravityMode
)
?
(
self
.
ForceFactory
.
getStrongGravity
(
(
self
.
ForceFactory
.
getStrongGravity
(
self
.
p
.
scalingRatio
self
.
p
.
scalingRatio
...
@@ -174,7 +174,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -174,7 +174,7 @@ var ForceAtlas2 = function(graph) {
break
;
break
;
case
3
:
// Attraction
case
3
:
// Attraction
// pr("caso 3")
// pr("caso 3")
var
Attraction
=
self
.
ForceFactory
.
buildAttraction
(
var
Attraction
=
self
.
ForceFactory
.
buildAttraction
(
self
.
p
.
linLogMode
,
self
.
p
.
linLogMode
,
self
.
p
.
outboundAttractionDistribution
,
self
.
p
.
outboundAttractionDistribution
,
...
@@ -216,7 +216,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -216,7 +216,7 @@ var ForceAtlas2 = function(graph) {
break
;
break
;
case
4
:
// Auto adjust speed
case
4
:
// Auto adjust speed
// pr("caso 4")
// pr("caso 4")
var
totalSwinging
=
0
;
// How much irregular movement
var
totalSwinging
=
0
;
// How much irregular movement
var
totalEffectiveTraction
=
0
;
// Hom much useful movement
var
totalEffectiveTraction
=
0
;
// Hom much useful movement
var
swingingSum
=
0
;
var
swingingSum
=
0
;
...
@@ -278,7 +278,7 @@ var ForceAtlas2 = function(graph) {
...
@@ -278,7 +278,7 @@ var ForceAtlas2 = function(graph) {
break
;
break
;
case
5
:
// Apply forces
case
5
:
// Apply forces
// pr("caso 5")
// pr("caso 5")
var
i
=
self
.
state
.
index
;
var
i
=
self
.
state
.
index
;
if
(
self
.
p
.
adjustSizes
)
{
if
(
self
.
p
.
adjustSizes
)
{
var
speed
=
self
.
p
.
speed
;
var
speed
=
self
.
p
.
speed
;
...
@@ -964,6 +964,20 @@ var startForceAtlas2 = function(graph,limit_it) {
...
@@ -964,6 +964,20 @@ var startForceAtlas2 = function(graph,limit_it) {
// pr(graph.nodes[0].x)
// pr(graph.nodes[0].x)
// pr(graph.nodes[0].y)
// pr(graph.nodes[0].y)
// pr("--------")
// pr("--------")
// nodes = graph.nodes;
// for(var n in nodes) {
// if(!nodes[n].hidden)
// nodes[n].degree = 0;
// }
// edges = graph.edges;
// for(var e in edges) {
// if(!edges[e].hidden) {
// }
// }
forceatlas2
=
new
ForceAtlas2
(
graph
);
forceatlas2
=
new
ForceAtlas2
(
graph
);
forceatlas2
.
setAutoSettings
();
forceatlas2
.
setAutoSettings
();
forceatlas2
.
init
();
forceatlas2
.
init
();
...
...
tinawebJS/js/enviroment.js
View file @
4a2a92f3
...
@@ -172,6 +172,7 @@ function changeType() {
...
@@ -172,6 +172,7 @@ function changeType() {
}
}
return
;
return
;
}
}
if
(
swclickActual
==
"semantic"
)
{
if
(
swclickActual
==
"semantic"
)
{
if
(
swMacro
)
{
if
(
swMacro
)
{
changeToMacro
(
"social"
);
changeToMacro
(
"social"
);
...
@@ -184,6 +185,7 @@ function changeType() {
...
@@ -184,6 +185,7 @@ function changeType() {
}
}
return
;
return
;
}
}
if
(
swclickActual
==
"sociosemantic"
)
{
if
(
swclickActual
==
"sociosemantic"
)
{
if
(
swMacro
)
{
if
(
swMacro
)
{
...
...
tinawebJS/js/main.js
View file @
4a2a92f3
...
@@ -228,6 +228,40 @@ function bringTheNoise(pathfile,type){
...
@@ -228,6 +228,40 @@ function bringTheNoise(pathfile,type){
var
netname
=
pathfile
.
replace
(
/
\_
/g
,
' '
).
toUpperCase
();
var
netname
=
pathfile
.
replace
(
/
\_
/g
,
' '
).
toUpperCase
();
$
(
"#network"
).
html
(
netname
);
$
(
"#network"
).
html
(
netname
);
// < === ASYNCHRONOUS FA2.JS === >
// < === ASYNCHRONOUS FA2.JS === >
// var vis_nds = getVisibleNodes();
// pr("before_change... visible nodes:")
// for(var i in vis_nds)
// pr(vis_nds[i].id+" : "+vis_nds[i].degree)
// var vis_ndsIndex = {}
// for(var n in vis_nds) {
// id = vis_nds[n].id
// vis_ndsIndex[id] = vis_nds[n]
// vis_ndsIndex[id].degree = 0;
// }
// var vis_edgs = getVisibleEdges();
// for(var e in vis_edgs) {
// e1 = vis_edgs[e]
// n1 = e1.source.id
// n2 = e1.target.id
// vis_ndsIndex[n1]["degree"]++;
// vis_ndsIndex[n2]["degree"]++;
// }
// pr("after_change... visible nodes:")
// for(var i in vis_ndsIndex)
// pr(vis_ndsIndex[i].id+" : "+vis_ndsIndex[i].degree)
pr
(
getClientTime
()
+
" : Ini FA2"
);
pr
(
getClientTime
()
+
" : Ini FA2"
);
var
ForceAtlas2
=
new
Worker
(
"FA2.js"
);
var
ForceAtlas2
=
new
Worker
(
"FA2.js"
);
ForceAtlas2
.
postMessage
({
ForceAtlas2
.
postMessage
({
...
@@ -628,7 +662,7 @@ function theListeners(){
...
@@ -628,7 +662,7 @@ function theListeners(){
});
});
//NodeWeightFilter ( "#sliderBNodeWeight" , "NGram" , "type" , "size")
//
NodeWeightFilter ( "#sliderBNodeWeight" , "NGram" , "type" , "size")
// EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
// EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
...
...
tinawebJS/js/sigma.parseCustom.js
View file @
4a2a92f3
...
@@ -643,7 +643,8 @@ function extractFromJson(data,seed){
...
@@ -643,7 +643,8 @@ function extractFromJson(data,seed){
nodeK
=
Nodes
[
i
];
nodeK
=
Nodes
[
i
];
nodeK
.
hidden
=
true
;
/**/
//should be uncommented
nodeK
.
hidden
=
true
;
/**/
//should be uncommented
partialGraph
.
addNode
(
i
,
nodeK
);
partialGraph
.
addNode
(
i
,
nodeK
);
}
else
{
}
else
{
partialGraph
.
addNode
(
i
,
Nodes
[
i
]);
partialGraph
.
addNode
(
i
,
Nodes
[
i
]);
unHide
(
i
);
unHide
(
i
);
}
}
...
...
tinawebJS/js/sigmaUtils.js
View file @
4a2a92f3
...
@@ -55,11 +55,17 @@ function getedgesIndex(){
...
@@ -55,11 +55,17 @@ function getedgesIndex(){
}
}
function
getVisibleEdges
()
{
function
getVisibleEdges
()
{
partialGraph
.
_core
.
graph
.
edges
.
filter
(
function
(
e
)
{
return
partialGraph
.
_core
.
graph
.
edges
.
filter
(
function
(
e
)
{
return
!
e
[
'hidden'
];
return
!
e
[
'hidden'
];
});
});
}
}
function
getVisibleNodes
()
{
return
partialGraph
.
_core
.
graph
.
nodes
.
filter
(
function
(
n
)
{
return
!
n
[
'hidden'
];
});
}
function
getn
(
id
){
function
getn
(
id
){
return
partialGraph
.
_core
.
graph
.
nodesIndex
[
id
];
return
partialGraph
.
_core
.
graph
.
nodesIndex
[
id
];
}
}
...
...
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