Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
46599baf
Commit
46599baf
authored
Jul 13, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-integrate samuel's tagcloud design in sidepanel
parent
efa58079
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
23 deletions
+60
-23
custom.css
static/lib/graphExplorer/libs/css2/custom.css
+2
-4
settings_explorerjs.js
static/lib/graphExplorer/settings_explorerjs.js
+2
-0
methods.js
static/lib/graphExplorer/tinawebJS/methods.js
+56
-19
No files found.
static/lib/graphExplorer/libs/css2/custom.css
View file @
46599baf
...
...
@@ -165,9 +165,7 @@
display
:
inline-block
;
border
:
solid
1px
;
/*box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.3); */
-moz-border-radius
:
6px
;
-webkit-border-radius
:
6px
;
-khtml-border-radius
:
6px
;
'+
border-radius
:
6px
;
border-color
:
#BDBDBD
;
padding
:
0px
2px
0px
2px
;
margin
:
1px
0px
1px
0px
;
...
...
@@ -376,7 +374,7 @@
.tab
{
display
:
inline-block
;
zoom
:
1
;
*
display
:
inline
;
background
:
#eee
;
border
:
solid
1px
#999
;
border-bottom
:
none
;
-moz-border-radius
:
4px
4px
0
0
;
-webkit-border-radius
:
4px
4px
0
0
;
}
.tab
a
{
font-size
:
12px
;
line-height
:
2em
;
display
:
block
;
padding
:
0
10px
;
outline
:
none
;
}
.tab
a
:hover
{
text-decoration
:
underline
;
}
.tab.active
{
background
:
#fff
;
padding-top
:
6px
;
position
:
relative
;
top
:
1
px
;
border-color
:
#666
;
}
.tab.active
{
background
:
#fff
;
padding-top
:
6px
;
position
:
relative
;
top
:
3
px
;
border-color
:
#666
;
}
.tab
a
.active
{
font-weight
:
bold
;
}
.tab-container
.panel-container
{
background
:
#fff
;
border
:
solid
#666
1px
;
padding
:
10px
;
-moz-border-radius
:
0
4px
4px
4px
;
-webkit-border-radius
:
0
4px
4px
4px
;
}
.panel-container
{
margin-bottom
:
10px
;
}
static/lib/graphExplorer/settings_explorerjs.js
View file @
46599baf
...
...
@@ -30,6 +30,8 @@ var mainfile = ["db.json"];
// getUrlParam.file = window.location.origin+"/"+$("#graphid").html(); // garg exclusive
// var corpusesList = {} // garg exclusive -> corpus comparison
var
tagcloud_limit
=
50
;
var
current_url
=
window
.
location
.
origin
+
window
.
location
.
pathname
+
window
.
location
.
search
getUrlParam
.
file
=
current_url
.
replace
(
/projects/g
,
"api/projects"
)
...
...
static/lib/graphExplorer/tinawebJS/methods.js
View file @
46599baf
...
...
@@ -405,22 +405,6 @@ function manualForceLabel(nodeid,active) {
partialGraph
.
draw
();
}
function
htmlfied_samenodes
(
elems
)
{
console
.
log
(
'FUN t.methods:htmlfied_samenodes'
)
var
sameNodes
=
[]
js1
=
' onmouseover="manualForceLabel(this.id,true);" '
;
js2
=
' onmouseout="manualForceLabel(this.id,true);" '
;
if
(
elems
.
length
>
0
)
{
var
A
=
getVisibleNodes
()
for
(
var
a
in
A
){
n
=
A
[
a
]
if
(
!
n
.
active
&&
n
.
color
.
charAt
(
0
)
==
"#"
)
{
sameNodes
.
push
(
'<li onmouseover="manualForceLabel(
\'
'
+
n
.
id
+
'
\'
,true)" onmouseout="manualForceLabel(
\'
'
+
n
.
id
+
'
\'
,false)" ><a>'
+
n
.
label
+
'</a></li>'
)
}
}
}
return
sameNodes
}
// nodes information div
function
htmlfied_nodesatts
(
elems
){
...
...
@@ -469,6 +453,45 @@ function htmlfied_nodesatts(elems){
return
socnodes
.
concat
(
semnodes
)
}
function
manualSelectNode
(
nodeid
)
{
console
.
log
(
'FUN t.methods:manualSelectNode'
)
cancelSelection
(
false
);
var
SelInst
=
new
SelectionEngine
();
SelInst
.
MultipleSelection2
({
nodes
:[
nodeid
]});
}
function
htmlfied_tagcloud
(
elems
,
limit
)
{
console
.
log
(
'FUN t.methods:htmlfied_tagcloud'
)
if
(
elems
.
length
==
0
)
return
false
;
var
termNodes
=
[]
js1
=
""
//'onclick="graphTagCloudElem(\'';
js2
=
""
//"');\""
frecMAX
=
elems
[
0
].
value
for
(
var
i
in
elems
){
if
(
i
==
limit
)
break
id
=
elems
[
i
].
key
frec
=
elems
[
i
].
value
if
(
frecMAX
==
1
)
fontSize
=
desirableTagCloudFont_MIN
;
else
{
fontSize
=
desirableTagCloudFont_MIN
+
(
frec
-
1
)
*
((
desirableTagCloudFont_MAX
-
desirableTagCloudFont_MIN
)
/
(
frecMAX
-
1
));
}
if
(
!
isUndef
(
Nodes
[
id
])){
// js1 js2
// onclick="graphTagCloudElem(' ');
var
jspart
=
' onclick="manualSelectNode(
\'
'
+
id
+
'
\'
)" onmouseover="manualForceLabel(
\'
'
+
id
+
'
\'
,true)" onmouseout="manualForceLabel(
\'
'
+
id
+
'
\'
,false)"'
htmlfied_terms
=
'<span class="tagcloud-item" style="font-size:'
+
fontSize
+
'px;" '
+
jspart
+
'>'
+
Nodes
[
id
].
label
+
'</span>'
;
termNodes
.
push
(
htmlfied_terms
)
}
}
return
termNodes
}
//missing: getTopPapers for both node types
//considering complete graphs case! <= maybe i should mv it
function
updateLeftPanel_fix
(
sels
,
oppos
)
{
...
...
@@ -500,9 +523,23 @@ function updateLeftPanel_fix( sels , oppos ) {
}
sameNodesDIV
=
""
;
sameNodesDIV
+=
'<div id="sameNodes"><ul style="list-style: none;">'
;
//tagcloud
sameNodesDIV
+=
htmlfied_samenodes
(
getNodeIDs
(
sels
)
).
join
(
"
\n
"
)
;
sameNodesDIV
+=
'</ul></div>'
;
if
(
getNodeIDs
(
sels
).
length
>
0
)
{
var
temp_voisinage
=
{}
var
A
=
getVisibleNodes
()
for
(
var
a
in
A
){
var
n
=
A
[
a
]
if
(
!
n
.
active
&&
n
.
color
.
charAt
(
0
)
==
"#"
)
{
temp_voisinage
[
n
.
id
]
=
Math
.
round
(
Nodes
[
n
.
id
].
size
)
}
}
var
voisinage
=
ArraySortByValue
(
temp_voisinage
,
function
(
a
,
b
){
return
b
-
a
});
sameNodesDIV
+=
'<div id="sameNodes">'
;
//tagcloud
var
tagcloud_opposite_neigh
=
htmlfied_tagcloud
(
voisinage
,
tagcloud_limit
)
sameNodesDIV
+=
(
tagcloud_opposite_neigh
!=
false
)
?
tagcloud_opposite_neigh
.
join
(
"
\n
"
)
:
"No related terms."
;
sameNodesDIV
+=
'</div>'
;
}
// getTopPapers("semantic");
...
...
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