Commit 6ff78c43 authored by qlobbe's avatar qlobbe

add terms paths

parent 02a8d026
...@@ -52,7 +52,10 @@ ...@@ -52,7 +52,10 @@
<button id="reset" class="button reset"> <button id="reset" class="button reset">
<i class="fas fa-expand-arrows-alt"></i> <i class="fas fa-expand-arrows-alt"></i>
</button> </button>
</div> <button id="label" class="button label">
<i class="fas fa-align-center"></i>
</button>
</div>
<!-- row 4 --> <!-- row 4 -->
...@@ -82,6 +85,7 @@ ...@@ -82,6 +85,7 @@
return function(e) { return function(e) {
try { try {
document.querySelector("#reset").style.visibility = "visible" document.querySelector("#reset").style.visibility = "visible"
document.querySelector("#label").style.visibility = "visible"
json = JSON.parse(e.target.result); json = JSON.parse(e.target.result);
draw(json) draw(json)
} catch (error) { } catch (error) {
...@@ -153,13 +157,15 @@ ...@@ -153,13 +157,15 @@
}); });
var groups = json.objects.filter(node => node.nodeType == "group").map(function(g){ var groups = json.objects.filter(node => node.nodeType == "group").map(function(g){
return { from : yearToDate(g.from) , return { from : yearToDate(g.from) ,
to : yearToDate(g.to) , to : yearToDate(g.to) ,
x : parseFloat(((g.pos).split(','))[0]) , x : parseFloat(((g.pos).split(','))[0]) ,
y : parseFloat(((g.pos).split(','))[1]) , y : parseFloat(((g.pos).split(','))[1]) ,
bId : parseInt(g.bId) , bId : parseInt(g.bId) ,
gId : parseInt(g._gvid) , gId : parseInt(g._gvid) ,
size : parseInt(g.support) } size : parseInt(g.support),
label : (g.label.slice(1, g.label.length - 1)).split('|'),
foundation : (g.foundation.slice(1, g.foundation.length - 1)).split('|') }
}); });
var links = json.edges.filter(edges => edges.edgeType == "link").map(function(l){ var links = json.edges.filter(edges => edges.edgeType == "link").map(function(l){
......
...@@ -103,7 +103,7 @@ body { ...@@ -103,7 +103,7 @@ body {
grid-row: 2 / 4; grid-row: 2 / 4;
grid-column: 15 / 16; grid-column: 15 / 16;
padding-top: 50%; padding-top: 50%;
padding-bottom: 50%; padding-bottom: 50%;
} }
/* -------------------- */ /* -------------------- */
...@@ -224,6 +224,15 @@ i.how:hover span { ...@@ -224,6 +224,15 @@ i.how:hover span {
visibility: hidden; visibility: hidden;
} }
.label {
visibility: hidden;
}
.labeled {
background-color: #0d1824;
color: white;
}
.input-file { .input-file {
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
...@@ -308,18 +317,53 @@ i.how:hover span { ...@@ -308,18 +317,53 @@ i.how:hover span {
fill: #4A5C70; fill: #4A5C70;
} }
/* ---------- phylo ---------- */ /* ---------- group ---------- */
.group-outer { .group-outer {
stroke-width: 1.5px; stroke-width: 1px;
stroke: #fff; stroke: #fff;
fill: #fff; fill: #fff;
} }
.group-inner { .group-inner {
stroke-width: 1px;
stroke: #0d1824;
fill: #0d1824;
/*cursor: pointer;*/
z-index: 10;
}
.group-inner-focus {
stroke: #f8381f;
}
.group-inner-unfocus {
stroke: #A9A9A9;
}
.group-path-focus {
stroke: #A9A9A9;
}
/* ---------- labels ---------- */
.ngrams {
visibility: hidden;
}
.term {
cursor: pointer; cursor: pointer;
}
.term:hover {
font-weight: bold;
}
.term-path {
fill: none;
stroke: #f8381f;
stroke-width: 1.5px; stroke-width: 1.5px;
fill: #0d1824; z-index: 1;
} }
/* ---------- phylo ---------- */ /* ---------- phylo ---------- */
...@@ -378,4 +422,5 @@ i.how:hover span { ...@@ -378,4 +422,5 @@ i.how:hover span {
z-index: 10; z-index: 10;
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
} }
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment