Skip to content

Commit f871d43

Browse files
committed
some QOL changes to nodes and arrows
1 parent d3e88b4 commit f871d43

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

hknweb/templates/studentservices/course_guide.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ <h2 style="text-align: center;">
262262
.attr("id", String)
263263
.attr("viewBox", "0 -5 10 10")
264264
.attr("markerUnits", "userSpaceOnUse")
265-
.attr("refX", circle_radius + 10)
265+
.attr("refX", circle_radius + 5)
266266
.attr("refY", 0)
267267
.attr("markerWidth", {{ params.marker_width }})
268268
.attr("markerHeight", {{ params.marker_height }})

hknweb/templates/studentservices/course_guide_test.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ <h2 style="text-align: center;">
103103
centerX = width / 2,
104104
centerY = width / 2,
105105
link_stroke_width = 5,
106-
arrowhead_size = link_stroke_width*1.5,
106+
arrowhead_size = link_stroke_width*1.75,
107107
circle_radius = {{ params.circle_radius }},
108108
title_circle_radius = circle_radius * 1.2,
109-
node_stroke_width = 1,
109+
node_stroke_width = 0,
110110
node_stroke = "gray"
111111

112112
const svg = d3.select("svg")
@@ -177,7 +177,7 @@ <h2 style="text-align: center;">
177177
.attr("id", `head-${i}`)
178178
.attr("viewBox", `0 -${arrowhead_size} ${arrowhead_size*2} ${arrowhead_size*2}`)
179179
.attr("markerUnits", "userSpaceOnUse")
180-
.attr("refX", circle_radius + arrowhead_size*1.5)
180+
.attr("refX", circle_radius + arrowhead_size*2 - link_stroke_width)
181181
.attr("refY", 0)
182182
.attr("markerWidth", arrowhead_size*2)
183183
.attr("markerHeight", arrowhead_size*2)
@@ -238,7 +238,7 @@ <h2 style="text-align: center;">
238238
node.on("mouseover", function(d) {
239239
d = d.srcElement.__data__;
240240
circles
241-
.attr("opacity", 0.6);
241+
.attr("opacity", 0.2);
242242

243243
let marked = new Set(),
244244
queue = [];
@@ -255,7 +255,7 @@ <h2 style="text-align: center;">
255255
circles
256256
.filter(d2 => d2.id === d.id)
257257
.attr("stroke", "black")
258-
.attr("stroke-width", node_stroke_width * 3);
258+
.attr("stroke-width", 3);
259259
link.filter(l => {
260260
return !marked.has(l.source.id) || !marked.has(l.target.id);
261261
})

0 commit comments

Comments
 (0)