Skip to content

Commit

Permalink
add selection style to em demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekucera committed Jul 4, 2024
1 parent beeddc9 commit f14a801
Showing 1 changed file with 40 additions and 28 deletions.
68 changes: 40 additions & 28 deletions debug/webgl/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,47 @@ var styles = {
file: 'network-ndex-large-style.json'
},

'em-web': [{
selector: "node",
style: {
"border-width": "12px",
"border-opacity": "0",
"width": "40px",
"height": "40px",
"font-size": "8px",
"text-valign": "center",
"text-wrap": "wrap",
"text-max-width": "80px",
"z-index": "1",
"label": "data(description)",
"text-outline-width": 2,
"color": "#fff",
"background-color": "mapData(NES, -3.14, 3.14, #0571b0, #ca0020)",
"text-outline-color": "mapData(NES, -3.14, 3.14, #0571b0, #ca0020)"
}
},
{
selector: "edge",
style: {
"line-color" : "#888",
"line-opacity": 0.3,
"curve-style": "haystack",
"haystack-radius": 0,
"width": ele => ele.data('similarity_coefficient') * 15,
'em-web': [
{
selector: "node",
style: {
"border-width": "12px",
"border-opacity": "0",
"width": "40px",
"height": "40px",
"font-size": "8px",
"text-valign": "center",
"text-wrap": "wrap",
"text-max-width": "80px",
"z-index": "1",
"label": "data(description)",
"text-outline-width": 2,
"color": "#fff",
"background-color": "mapData(NES, -3.14, 3.14, #0571b0, #ca0020)",
"text-outline-color": "mapData(NES, -3.14, 3.14, #0571b0, #ca0020)"
}
},
{
selector: "node:selected",
style: {
'border-width': 8,
'border-color': '#333333',
'border-opacity': 1.0,
'text-outline-color': '#333333',
'z-index': 99999999,
}
},
{
selector: "edge",
style: {
"line-color" : "#888",
"line-opacity": 0.3,
"curve-style": "haystack",
"haystack-radius": 0,
"width": ele => ele.data('similarity_coefficient') * 15,
}
}
}],
],

'tiny': [
{
Expand Down

0 comments on commit f14a801

Please sign in to comment.