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
a30b3fe5
Commit
a30b3fe5
authored
Apr 06, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reconnect FA2 with config from comex and sam's work
parent
e9b2145c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
15 deletions
+39
-15
explorerjs.html
explorerjs.html
+4
-1
Tinaweb.js
tinawebJS/Tinaweb.js
+7
-13
main.js
tinawebJS/main.js
+28
-1
No files found.
explorerjs.html
View file @
a30b3fe5
...
...
@@ -325,7 +325,7 @@
</li>
<li>
<a
href=
"#"
id=
"
edges
Button"
class=
"zoombarbuttons"
>
<a
href=
"#"
id=
"
layout
Button"
class=
"zoombarbuttons"
>
<img
src=
"libs/img2/edges.png"
style=
"width:32px"
>
</a>
</li>
...
...
@@ -554,6 +554,9 @@
<script
src=
"tinawebJS/sigma_v1.2/plugins/sigma.layout.forceAtlas2/supervisor.js"
></script>
<script
src=
"tinawebJS/sigma_v1.2/plugins/sigma.layout.forceAtlas2/worker.js"
></script>
<!-- testing sigma 1.5 imports from linkurious src -->
<!-- <script src="tinawebJS/sigma_v1.5/sigma.js" type="text/javascript" language="javascript"></script>
<script src="tinawebJS/sigma_v1.5/plugins.js" type="text/javascript" language="javascript"></script> -->
<!-- new sigma (1.0c => 1.2) compatibility imports -->
<script
src=
"tinawebJS/sigma_tools.js"
></script>
...
...
tinawebJS/Tinaweb.js
View file @
a30b3fe5
...
...
@@ -711,21 +711,15 @@ TinaWebJS = function ( sigmacanvas ) {
}
});
$
(
"#edgesButton"
).
click
(
function
()
{
fa2enabled
=
true
;
if
(
!
isUndef
(
partialGraph
.
forceatlas2
))
{
if
(
partialGraph
.
forceatlas2
.
active
)
{
partialGraph
.
stopForceAtlas2
();
partialGraph
.
render
();
return
;
}
else
{
partialGraph
.
startForceAtlas2
();
return
;
}
$
(
"#layoutButton"
).
click
(
function
()
{
if
(
TW
.
partialGraph
.
isForceAtlas2Running
())
{
partialGraph
.
stopForceAtlas2
();
partialGraph
.
render
();
fa2enabled
=
false
;
return
;
}
else
{
partialGraph
.
startForceAtlas2
();
fa2enabled
=
true
;
return
;
}
});
...
...
tinawebJS/main.js
View file @
a30b3fe5
...
...
@@ -241,7 +241,10 @@ if(RES["OK"]) {
rescaleIgnoreSize
:
true
,
mouseEnabled
:
true
,
touchEnabled
:
false
touchEnabled
:
false
,
animationsTime
:
300
,
mouseZoomDuration
:
500
},
sigmaJsDrawingProperties
,
sigmaJsGraphProperties
,
...
...
@@ -284,6 +287,7 @@ if(RES["OK"]) {
},
settings
:
customSettings
});
// ==================================================================
// shortcuts to the renderer and camera
TW
.
cam
=
TW
.
partialGraph
.
camera
...
...
@@ -404,6 +408,29 @@ if(RES["OK"]) {
}
}).
index
();
// config for any future forceAtlas2 calls
TW
.
partialGraph
.
configForceAtlas2
({
// adapting speed -------------
slowDown
:
1
,
startingIterations
:
5
,
iterationsPerRender
:
3
,
barnesHutOptimize
:
false
,
barnesHutTheta
:
.
5
,
// global behavior -----------
linLogMode
:
true
,
edgeWeightInfluence
:
.
5
,
gravity
:
3
,
strongGravityMode
:
false
,
scalingRatio
:
1
,
adjustSizes
:
false
,
// ~ messy but sort of in favor of overlap prevention
// favors global centrality
// (but rather not needed when data already shows topic-centered
// node groups and/nor when preferential attachment type of data)
outboundAttractionDistribution
:
false
})
// REFA new sigma.js
TW
.
partialGraph
.
camera
.
goTo
({
x
:
0
,
y
:
0
,
ratio
:
1.2
,
angle
:
0
})
...
...
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