Skip to content

Commit

Permalink
add scrollbar to DOI text
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoeLi0525 committed Apr 23, 2024
1 parent 02a2ea7 commit c733f05
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ a.iwr-vis:active {
font-size: 6px;
line-height: 6px;
overflow-y:scroll;
scrollbar-width: thin;
height: 90px;
}

.iwr-vis-group-card-doi {
font-size: 6px;
line-height: 6px;
overflow-y:scroll;
scrollbar-width: thin;
height: 20px;
}

.iwr-vis-menu {
position: absolute;
left: 0;
Expand Down
16 changes: 6 additions & 10 deletions src/js/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function addSegments(
add.polyline([0, 0, 4, 2, 0, 4]).fill(color).stroke("none");
});
const txtAngle = 4 + label.length / 2;
const arrowPadding = 3;
const arrowPadding = 4;
groupLabel
.path(
Utils.makeArrowArc(
Expand Down Expand Up @@ -472,22 +472,18 @@ function addGroupCard(svg, member, color, image_base_url) {
if(v.trim().length == 0 ){
continue;
}
if(i % 2 == 0){
doi_content += "DOI:[" + v + "]<br>";
}else{
doi_content += "DOI:[" + v + "] ";
}
doi_content += "DOI:[" + v + "]<br>";
}
const doi = group_card.foreignObject(180, 95).attr({x: 110, y: y});
const doi = group_card.foreignObject(180, 20).attr({x: 110, y: y});
doi.add(
SVG(
'<div xmlns="http://www.w3.org/1999/xhtml" class="iwr-vis-group-card-html">' +
'<div xmlns="http://www.w3.org/1999/xhtml" class="iwr-vis-group-card-doi">' +
doi_content +
"</div>",
true,
),
);
y += 18;
y += 28;
const blurb = group_card.foreignObject(180, 95).attr({ x: 110, y: y });
blurb.add(
SVG(
Expand Down Expand Up @@ -612,7 +608,7 @@ function addSettings(svg) {
.attr({ "stroke-width": 0.5 })
.addClass("iwr-vis-settings-menu-sort-by-prof");
sort_by_prof
.text("name")
.text("software name")
.x(24)
.y(28)
.attr("font-size", "8px")
Expand Down

0 comments on commit c733f05

Please sign in to comment.