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
7e263594
Commit
7e263594
authored
Apr 06, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimized settings so far + remarks
parent
435ca68c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
settings_explorerjs.js
settings_explorerjs.js
+1
-1
main.js
tinawebJS/main.js
+13
-3
sigmaUtils.js
tinawebJS/sigmaUtils.js
+5
-7
No files found.
settings_explorerjs.js
View file @
7e263594
...
@@ -100,7 +100,7 @@ var semanticConverged=false;
...
@@ -100,7 +100,7 @@ var semanticConverged=false;
var
showLabelsIfZoom
=
1.0
;
var
showLabelsIfZoom
=
1.0
;
TW
.
edgeDefaultOpacity
=
0.3
// opacity when true_color
TW
.
edgeDefaultOpacity
=
0.3
// opacity when true_color
TW
.
edgeGreyColor
=
"rgba(200, 200, 200, 0.5)"
;
TW
.
edgeGreyColor
=
"rgba(200, 200, 200, 0.5)"
;
TW
.
overSampling
=
fals
e
// costly hi-def rendering (true => pixelRatio x 2)
TW
.
overSampling
=
tru
e
// costly hi-def rendering (true => pixelRatio x 2)
// ============ < / DEVELOPER OPTIONS > ============
// ============ < / DEVELOPER OPTIONS > ============
...
...
tinawebJS/main.js
View file @
7e263594
...
@@ -217,20 +217,29 @@ if(RES["OK"]) {
...
@@ -217,20 +217,29 @@ if(RES["OK"]) {
TW
.
graphData
=
{
nodes
:
[],
edges
:
[]}
TW
.
graphData
=
{
nodes
:
[],
edges
:
[]}
TW
.
graphData
=
sigma_utils
.
FillGraph
(
initialState
,
catDict
,
dicts
.
nodes
,
dicts
.
edges
,
TW
.
graphData
);
TW
.
graphData
=
sigma_utils
.
FillGraph
(
initialState
,
catDict
,
dicts
.
nodes
,
dicts
.
edges
,
TW
.
graphData
);
// cf github.com/jacomyal/sigma.js/wiki/Settings
var
customSettings
=
Object
.
assign
(
var
customSettings
=
Object
.
assign
(
{
{
drawEdges
:
true
,
drawEdges
:
true
,
drawNodes
:
true
,
drawNodes
:
true
,
drawLabels
:
true
,
drawLabels
:
true
,
// nodesPowRatio: .1,
labelSize
:
"proportional"
,
labelSize
:
"proportional"
,
font
:
"Ubuntu Condensed"
,
font
:
"Ubuntu Condensed"
,
fontStyle
:
"bold"
,
// labelColor: "node",
// labelColor: "node",
// fontStyle: "bold",
// nodesPowRatio: .3,
batchEdgesDrawing
:
true
,
batchEdgesDrawing
:
true
,
hideEdgesOnMove
:
true
,
enableHovering
:
true
,
singleHover
:
true
,
singleHover
:
true
,
enableEdgeHovering
:
false
,
autoResize
:
true
,
autoResize
:
true
,
rescaleIgnoreSize
:
true
,
mouseEnabled
:
true
,
mouseEnabled
:
true
,
touchEnabled
:
false
touchEnabled
:
false
},
},
...
@@ -256,6 +265,7 @@ if(RES["OK"]) {
...
@@ -256,6 +265,7 @@ if(RES["OK"]) {
// - additionnaly supports 'forcelabel' node property
// - additionnaly supports 'forcelabel' node property
sigma
.
canvas
.
labels
.
def
=
sigma_utils
.
twRender
.
canvas
.
labels
.
def
sigma
.
canvas
.
labels
.
def
=
sigma_utils
.
twRender
.
canvas
.
labels
.
def
// ==================================================================
// ==================================================================
// sigma js library invocation (https://github.com/jacomyal/sigma.js)
// sigma js library invocation (https://github.com/jacomyal/sigma.js)
// ==================================================================
// ==================================================================
...
...
tinawebJS/sigmaUtils.js
View file @
7e263594
...
@@ -130,7 +130,7 @@ SigmaUtils = function () {
...
@@ -130,7 +130,7 @@ SigmaUtils = function () {
};
};
// source: github.com/jacomyal/sigma.js/commit/25e2153
// source: github.com/jacomyal/sigma.js/commit/25e2153
// POSS: modify to incorporate mix colors
// POSS: modify to incorporate mix colors
(repaintEdges)
this
.
twRender
.
canvas
.
edges
.
curve
=
function
(
edge
,
source
,
target
,
context
,
settings
)
{
this
.
twRender
.
canvas
.
edges
.
curve
=
function
(
edge
,
source
,
target
,
context
,
settings
)
{
var
color
=
edge
.
color
,
var
color
=
edge
.
color
,
prefix
=
settings
(
'prefix'
)
||
''
,
prefix
=
settings
(
'prefix'
)
||
''
,
...
@@ -202,6 +202,7 @@ SigmaUtils = function () {
...
@@ -202,6 +202,7 @@ SigmaUtils = function () {
context
.
fill
();
context
.
fill
();
};
};
// ================ /alternative rendering =====================
this
.
toggleEdges
=
function
()
{
this
.
toggleEdges
=
function
()
{
var
now_flag
=
TW
.
partialGraph
.
settings
(
'drawEdges'
)
var
now_flag
=
TW
.
partialGraph
.
settings
(
'drawEdges'
)
...
@@ -209,15 +210,12 @@ SigmaUtils = function () {
...
@@ -209,15 +210,12 @@ SigmaUtils = function () {
TW
.
partialGraph
.
render
()
TW
.
partialGraph
.
render
()
}
}
}
// /SigmaUtils object
// ================ /alternative rendering =====================
}
//for socialgraph
//for socialgraph
function
showMeSomeLabels
(
N
){
function
showMeSomeLabels
(
N
){
// NB why is this not using methods.manualForceLabel ?!
/*======= Show some labels at the beginning =======*/
/*======= Show some labels at the beginning =======*/
minIn
=
50
,
minIn
=
50
,
maxIn
=
0
,
maxIn
=
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