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
db4ed596
Commit
db4ed596
authored
Jun 28, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '644e50d' into with_tina_1.2
parents
765b533b
9532a8e0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
38 deletions
+18
-38
explorerjs.html
explorerjs.html
+1
-1
settings_explorerjs.js
settings_explorerjs.js
+1
-1
Tinaweb.js
twmain/Tinaweb.js
+1
-1
enviroment.js
twmain/enviroment.js
+3
-0
extras_explorerjs.js
twmain/extras_explorerjs.js
+9
-22
main.js
twmain/main.js
+1
-5
sigmaUtils.js
twmain/sigmaUtils.js
+2
-8
No files found.
explorerjs.html
View file @
db4ed596
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<link
rel=
"stylesheet"
href=
"twlibs3/jquery-3/jquery-ui-1.12.1/jquery-ui.min.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"twlibs3/jquery-3/jquery-ui-1.12.1/jquery-ui.min.css"
media=
"screen"
>
<!-- NB bootstrap 3 not used for main grid (graph + bars) but inside the bars -->
<!-- NB bootstrap 3 not used for main grid (graph + bars) but inside the bars -->
<link
rel=
"stylesheet"
href=
"twlibs3/bootstrap-3/css/bootstrap.min.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"twlibs3/bootstrap-3/css/bootstrap.min.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"twlibs3/
css/
freshslider/freshslider.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"twlibs3/freshslider/freshslider.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"twlibs3/tweets/tweet.light.ltr.css"
/>
<link
rel=
"stylesheet"
href=
"twlibs3/tweets/tweet.light.ltr.css"
/>
<link
rel=
"stylesheet"
href=
"twlibs3/tweets/custom.css"
/>
<link
rel=
"stylesheet"
href=
"twlibs3/tweets/custom.css"
/>
...
...
settings_explorerjs.js
View file @
db4ed596
...
@@ -187,7 +187,7 @@ TW.conf = (function(TW){
...
@@ -187,7 +187,7 @@ TW.conf = (function(TW){
TWConf
.
filterSliders
=
true
// show sliders for nodes/edges subsets
TWConf
.
filterSliders
=
true
// show sliders for nodes/edges subsets
TWConf
.
c
lusterColorsAtt
=
true
;
// show "Set colors" menu
TWConf
.
c
olorByAtt
=
true
;
// show "Set colors" menu
TWConf
.
dragNodesAvailable
=
true
;
// allow dragging nodes with CTRL+click
TWConf
.
dragNodesAvailable
=
true
;
// allow dragging nodes with CTRL+click
...
...
twmain/Tinaweb.js
View file @
db4ed596
...
@@ -730,7 +730,7 @@ var TinaWebJS = function ( sigmacanvas ) {
...
@@ -730,7 +730,7 @@ var TinaWebJS = function ( sigmacanvas ) {
TW
.
partialGraph
.
camera
.
goTo
({
x
:
0
,
y
:
0
,
ratio
:
1.2
})
TW
.
partialGraph
.
camera
.
goTo
({
x
:
0
,
y
:
0
,
ratio
:
1.2
})
});
});
if
(
!
TW
.
conf
.
c
lusterColors
Att
)
{
if
(
!
TW
.
conf
.
c
olorBy
Att
)
{
$
(
"#setcolorsMenu"
).
hide
()
$
(
"#setcolorsMenu"
).
hide
()
}
}
...
...
twmain/enviroment.js
View file @
db4ed596
...
@@ -433,6 +433,9 @@ function changeType() {
...
@@ -433,6 +433,9 @@ function changeType() {
// possible: add it in an early way here and request that MS2 doesn't change state
// possible: add it in an early way here and request that MS2 doesn't change state
})
})
// update the color menu
changeGraphAppearanceByFacets
(
getActivetypesNames
()
)
// to recreate the new selection in the new type graph, if we had one before
// to recreate the new selection in the new type graph, if we had one before
// NB relies on new actypes so should be after pushState
// NB relies on new actypes so should be after pushState
if
(
newselsArr
.
length
&&
sels
.
length
)
{
if
(
newselsArr
.
length
&&
sels
.
length
)
{
...
...
twmain/extras_explorerjs.js
View file @
db4ed596
...
@@ -14,26 +14,23 @@ TW.gui.colorFuns = {
...
@@ -14,26 +14,23 @@ TW.gui.colorFuns = {
// Execution: changeGraphAppearanceByFacets( true )
// Execution: changeGraphAppearanceByFacets( true )
// It reads scanned node-attributes and prepared legends in TW.Clusters
// It reads scanned node-attributes and prepared legends in TW.Clusters
// to add the button in the html with the sigmaUtils.gradientColoring(x) listener.
// to add the button in the html with the sigmaUtils.gradientColoring(x) listener.
function
changeGraphAppearanceByFacets
(
manualflag
)
{
function
changeGraphAppearanceByFacets
(
actypes
)
{
if
(
!
isUndef
(
manualflag
)
&&
!
TW
.
conf
.
colorByAtt
)
TW
.
conf
.
colorByAtt
=
manualflag
;
if
(
!
TW
.
conf
.
colorByAtt
)
return
;
if
(
!
TW
.
conf
.
colorByAtt
)
return
;
if
(
!
actypes
)
actypes
=
getActivetypesNames
()
let
currentNbNodes
=
TW
.
partialGraph
.
graph
.
nNodes
()
let
currentNbNodes
=
TW
.
partialGraph
.
graph
.
nNodes
()
// create colormenu and 1st default entry
// create colormenu and 1st default entry
var
color_menu_info
=
'<li><a href="#" onclick="TW.gui.handpickedcolor = false ; graphResetLabelsAndSizes()">By Default</a></li>'
;
var
color_menu_info
=
'<li><a href="#" onclick="TW.gui.handpickedcolor = false ; graphResetLabelsAndSizes()">By Default</a></li>'
;
if
(
$
(
"#colorgraph-menu"
).
length
>
0
)
{
if
(
$
(
"#colorgraph-menu"
).
length
>
0
)
{
var
actypes
=
getActivetypesNames
()
for
(
var
tid
in
actypes
)
{
for
(
var
tid
in
actypes
)
{
let
ty
=
actypes
[
tid
]
let
ty
=
actypes
[
tid
]
// each facet family or clustering type was already prepared
// each facet family or clustering type was already prepared
for
(
var
attTitle
in
TW
.
Clusters
[
ty
])
{
for
(
var
attTitle
in
TW
.
Clusters
[
ty
])
{
// attribute counts: nb of classes
// attribute counts: nb of classes
// POSS here distinguish [ty][attTitle].classes.length and ranges.length
// POSS here distinguish [ty][attTitle].classes.length and ranges.length
var
attNbClasses
=
TW
.
Clusters
[
ty
][
attTitle
].
invIdx
.
length
var
attNbClasses
=
TW
.
Clusters
[
ty
][
attTitle
].
invIdx
.
length
...
@@ -192,21 +189,11 @@ function SomeEffect( ValueclassCode ) {
...
@@ -192,21 +189,11 @@ function SomeEffect( ValueclassCode ) {
var
activetypesKey
=
getActivetypesKey
()
var
activetypesKey
=
getActivetypesKey
()
// we have our precomputed idmaps for nodes_2_colour
// we have our precomputed idmaps for nodes_2_colour => full selection
// -------------------------------------------------
// /!\ nodeset can be quite big
for
(
var
k
in
TW
.
Clusters
[
nodeType
][
cluType
].
invIdx
[
iClu
].
nids
)
{
TW
.
instance
.
selNgn
.
MultipleSelection2
(
var
nid
=
TW
.
Clusters
[
nodeType
][
cluType
].
invIdx
[
iClu
].
nids
[
k
]
{
nodes
:
TW
.
Clusters
[
nodeType
][
cluType
].
invIdx
[
iClu
].
nids
}
nodes_2_colour
[
nid
]
=
true
)
n
=
TW
.
partialGraph
.
graph
.
nodes
(
nid
)
if
(
n
)
{
n
.
customAttrs
[
'highlight'
]
=
true
;
}
}
TW
.
pushState
({
sels
:
TW
.
Clusters
[
nodeType
][
cluType
].
invIdx
[
iClu
].
nids
,
rels
:{}
})
TW
.
partialGraph
.
refresh
()
TW
.
partialGraph
.
refresh
()
}
}
...
@@ -1035,7 +1022,7 @@ function newAttrConfAndColor() {
...
@@ -1035,7 +1022,7 @@ function newAttrConfAndColor() {
// console.log("reparse binned result", newClustering)
// console.log("reparse binned result", newClustering)
// update the GUI menu
// update the GUI menu
changeGraphAppearanceByFacets
(
true
)
changeGraphAppearanceByFacets
()
// run the new color
// run the new color
let
colMethod
=
TW
.
gui
.
colorFuns
[
TW
.
conf
.
facetOptions
[
attrTitle
][
'col'
]]
let
colMethod
=
TW
.
gui
.
colorFuns
[
TW
.
conf
.
facetOptions
[
attrTitle
][
'col'
]]
...
...
twmain/main.js
View file @
db4ed596
...
@@ -302,10 +302,6 @@ function syncRemoteGraphData () {
...
@@ -302,10 +302,6 @@ function syncRemoteGraphData () {
TW
.
relDocsInfos
[
path
+
"/"
+
aGexf
][
'social'
]
=
theGexfs
[
aGexf
][
"social"
][
"table"
]
TW
.
relDocsInfos
[
path
+
"/"
+
aGexf
][
'social'
]
=
theGexfs
[
aGexf
][
"social"
][
"table"
]
}
}
}
}
console
.
log
(
"TW.relDocsInfos"
,
TW
.
relDocsInfos
)
}
}
else
{
else
{
TW
.
relDocsInfos
[
path
+
"/"
+
aGexf
]
=
null
TW
.
relDocsInfos
[
path
+
"/"
+
aGexf
]
=
null
...
@@ -618,7 +614,7 @@ function mainStartGraph(inFormat, inData, twInstance) {
...
@@ -618,7 +614,7 @@ function mainStartGraph(inFormat, inData, twInstance) {
// should prepare the colors/clusters menu once and for all
// should prepare the colors/clusters menu once and for all
// (previously, needed to be called after changeType/changeLevel)
// (previously, needed to be called after changeType/changeLevel)
changeGraphAppearanceByFacets
(
true
)
changeGraphAppearanceByFacets
()
// set the default legend
// set the default legend
set_ClustersLegend
(
"clust_default"
)
set_ClustersLegend
(
"clust_default"
)
...
...
twmain/sigmaUtils.js
View file @
db4ed596
...
@@ -889,13 +889,7 @@ function heatmapColoring(daclass) {
...
@@ -889,13 +889,7 @@ function heatmapColoring(daclass) {
function
clusterColoring
(
daclass
)
{
function
clusterColoring
(
daclass
)
{
console
.
log
(
""
)
console
.
log
(
" = = = = = = = = = = = = = = = = = "
)
console
.
log
(
" = = = = = = = = = = = = = = = = = "
)
console
.
log
(
"clusterColoring ( "
+
daclass
+
" )"
)
console
.
log
(
"clusterColoring ( "
+
daclass
+
" )"
)
console
.
log
(
" = = = = = = = = = = = = = = = = = "
)
console
.
log
(
" = = = = = = = = = = = = = = = = = "
)
console
.
log
(
""
)
cancelSelection
(
false
);
// now loops only on selected
cancelSelection
(
false
);
// now loops only on selected
graphResetLabelsAndSizes
()
// full loop
graphResetLabelsAndSizes
()
// full loop
...
@@ -953,7 +947,7 @@ function clusterColoring(daclass) {
...
@@ -953,7 +947,7 @@ function clusterColoring(daclass) {
let
val
=
valGroup
.
val
||
valGroup
.
range
let
val
=
valGroup
.
val
||
valGroup
.
range
// use the int as an index between 0 and nColors
// use the int as an index between 0 and nColors
if
(
parseInt
(
val
)
==
val
)
{
if
(
parseInt
(
val
)
==
val
)
{
theColor
=
colList
[
val
]
%
nColors
theColor
=
colList
[
val
%
nColors
]
}
}
// or create a representative int on the same range
// or create a representative int on the same range
else
{
else
{
...
@@ -973,7 +967,7 @@ function clusterColoring(daclass) {
...
@@ -973,7 +967,7 @@ function clusterColoring(daclass) {
}
}
}
}
// rem
b
ember in TW.Clusters
// remember in TW.Clusters
valGroup
.
col
=
theColor
valGroup
.
col
=
theColor
}
}
}
}
...
...
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