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
90f88358
Commit
90f88358
authored
Oct 20, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glorious bugfix [filter+FA2+isolated]-interaction
parent
673ee45f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
10 deletions
+65
-10
settings_explorerjs.js
settings_explorerjs.js
+1
-1
methods.js
tinawebJS/js/methods.js
+19
-0
sigma.forceatlas2.js
tinawebJS/js/sigma.forceatlas2.js
+23
-8
sigma.min.js
tinawebJS/js/sigma.min.js
+22
-1
No files found.
settings_explorerjs.js
View file @
90f88358
...
...
@@ -52,7 +52,7 @@ var stopcriteria = false;
var
iterationsFA2
=
1000
;
var
seed
=
999999999
;
//defaultseed
var
semanticConverged
=
false
;
var
isolatedBCauseFilter
=
0
;
var
showLabelsIfZoom
=
2.0
;
...
...
tinawebJS/js/methods.js
View file @
90f88358
...
...
@@ -1370,6 +1370,7 @@ function unHide(id){
}
partialGraph
.
addNode
(
id
,
anode
);
pr
(
partialGraph
.
_core
.
graph
.
nodesIndex
[
id
].
displayX
)
return
;
}
}
...
...
@@ -1448,6 +1449,7 @@ function unHideElem(id){
function
changeToMeso
(
iwannagraph
)
{
labels
=
[]
partialGraph
.
stopForceAtlas2
();
partialGraph
.
emptyGraph
();
pr
(
"changing to Meso-"
+
iwannagraph
);
if
(
iwannagraph
==
"social"
)
{
...
...
@@ -1659,6 +1661,7 @@ function changeToMacro(iwannagraph) {
// pr("--------------------------------------------------------------------------------")
partialGraph
.
stopForceAtlas2
();
partialGraph
.
emptyGraph
();
if
(
iwannagraph
==
"semantic"
&&
!
semanticConverged
)
{
...
...
@@ -1683,15 +1686,29 @@ function changeToMacro(iwannagraph) {
unHide
(
n
);
}
}
// and semantic edges
pr
(
"im here"
)
createEdgesForExistingNodes
(
iwannagraph
);
pr
(
"im also here"
)
pr
(
"nodes:"
)
pr
(
partialGraph
.
_core
.
graph
.
nodesIndex
)
pr
(
"edges:"
)
pr
(
partialGraph
.
_core
.
graph
.
edgesIndex
)
if
(
iwannagraph
==
"social"
)
showMeSomeLabels
(
6
);
swMacro
=
true
;
pr
(
"im now here"
)
if
(
!
is_empty
(
selections
))
$
.
doTimeout
(
10
,
function
(){
chosenones
=
(
PAST
==
"a"
||
PAST
==
"b"
)?
selections
:
opossites
;
pr
(
"the chosen ones"
)
pr
(
chosenones
)
MultipleSelection
(
Object
.
keys
(
chosenones
))
pr
(
"im now right here"
)
});
}
else
{
...
...
@@ -1755,6 +1772,8 @@ function changeToMacro(iwannagraph) {
// partialGraph.draw();
// // partialGraph.zoomTo(partialGraph._core.width / 2, partialGraph._core.height / 2, 0.8);
// partialGraph.refresh();
fa2enabled
=
true
;
partialGraph
.
startForceAtlas2
();
$
(
'.gradient'
).
css
({
"background-size"
:
"40px 40px"
});
}
...
...
tinawebJS/js/sigma.forceatlas2.js
View file @
90f88358
...
...
@@ -1110,16 +1110,26 @@ sigma.publicPrototype.startForceAtlas2 = function() {
//if(!this.forceatlas2) {
if
(
fa2enabled
)
{
/*
isolatedBCauseFilter = 0;
for (var i in this._core.graph.nodesIndex) {
if(this._core.graph.nodesIndex[i].degree==0) {
this._core.graph.nodesIndex[i].hidden=true;
isolatedBCauseFilter++;
pr
(
"
\
t
\
t
\
t
\
t
\
tFA2 Started"
)
var
ene
=
this
.
_core
.
graph
.
nodes
.
length
;
var
isolatedBCauseFilter
=
0
;
for
(
var
i
in
this
.
_core
.
graph
.
nodesIndex
)
{
if
(
this
.
_core
.
graph
.
nodesIndex
[
i
].
degree
==
0
)
isolatedBCauseFilter
++
;
}
pr
(
"|||||||||| probando una cosa super loca"
)
pr
(
"|||||||||| isolatedBCauseFilter "
+
isolatedBCauseFilter
)
pr
(
"|||||||||| ene "
+
ene
)
pr
(
"isolatedBCauseFilter==ene = "
+
(
isolatedBCauseFilter
==
ene
))
if
(
isolatedBCauseFilter
==
ene
)
{
partialGraph
.
stopForceAtlas2
();
return
;
}
}
*/
...
...
@@ -1200,12 +1210,17 @@ sigma.publicPrototype.startForceAtlas2 = function() {
};
sigma
.
publicPrototype
.
stopForceAtlas2
=
function
()
{
pr
(
"
\
t
\
t
\
t
\
t
\
tFA2 Stopped"
)
fa2enabled
=
false
;
this
.
removeGenerator
(
'forceatlas2'
);
updateMap
();
partialGraph
.
refresh
();
if
(
minimap
)
$
(
"#overviewzone"
).
show
();
/*
// calc dimensions of connected subgraphs
...
...
tinawebJS/js/sigma.min.js
View file @
90f88358
...
...
@@ -1274,10 +1274,31 @@ sigma.classes.Cascade = function() {
*/
function
empty
()
{
self
.
nodes
=
[];
if
(
self
.
nodes
.
length
>
0
)
{
pr
(
"splicing nodes"
)
self
.
nodes
.
splice
(
0
,
self
.
nodes
.
length
);
}
self
.
nodesIndex
=
{};
if
(
self
.
nodesIndex
.
length
>
0
)
{
pr
(
"splicing nodesIndex"
)
self
.
nodesIndex
.
splice
(
0
,
self
.
nodesIndex
.
length
);
}
self
.
edges
=
[];
self
.
edgesIndex
=
{};
if
(
self
.
edges
.
length
>
0
)
{
pr
(
"splicing edges"
)
self
.
edges
.
splice
(
0
,
self
.
edges
.
length
);
}
self
.
edgesIndex
=
{};
if
(
self
.
edgesIndex
.
length
>
0
)
{
pr
(
"splicing edgesIndex"
)
self
.
edgesIndex
.
splice
(
0
,
self
.
edgesIndex
.
length
);
}
overNodes
=
false
;
return
self
;
...
...
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