Skip to content

Commit

Permalink
feat: add border + shadow upon click
Browse files Browse the repository at this point in the history
  • Loading branch information
huyen-nguyen committed Oct 14, 2024
1 parent 19eab95 commit 0fe28a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>WordStream</title>
<link rel="shortcut icon" href="media/images/wslib.png">
<script src="js/d3.v4.min.js"></script>
<script src="js/wordstream.min.js"></script>
<script src="js/wordstream.js"></script>

</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions js/wordstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@
.attr("transform", function (d, i) {
return 'translate(' + thePoint.data.x + ',' + (thePoint[1] - fontSize / 2) + ')';
});
d3.select(clonedParentNode).select("text")
.style("text-shadow", "-0.5px 0.5px 0 #fff, -0.5px -0.5px 0 #fff, 0.5px -0.5px 0 #fff, -0.5px 0.5px 0 #fff, 0.5px 0.5px 0 #fff")
});
//Add the first and the last points
points[0][1] = points[1][1];//First point
Expand Down

0 comments on commit 0fe28a2

Please sign in to comment.