Skip to content

Commit 3f1c3aa

Browse files
author
feddelegrand7
committed
Minor
1 parent 7fa4708 commit 3f1c3aa

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

inst/d3/scatterplot/plant_growth.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
d3.select("head").append("style").html(`
2-
.plant_growth_flower:hover {
3-
animation: wiggle 0.4s ease-in-out infinite alternate;
4-
transform-origin: center;
5-
}
6-
7-
@keyframes wiggle {
8-
0% { transform: rotate(0deg); }
9-
50% { transform: rotate(3deg); }
10-
100% { transform: rotate(-3deg); }
11-
}
12-
`);
131

142
const potWidth = options.potWidth || 100;
153
const potHeight = options.potHeight || 40;
@@ -76,23 +64,20 @@ if (data > 0.5) {
7664
.attr("cx", centerX)
7765
.attr("cy", stemY - 8)
7866
.attr("r", flowerSize)
79-
.attr("fill", flowerColor)
80-
.attr("class", "plant_growth_flower");
67+
.attr("fill", flowerColor);
8168

8269
// Leaf flowers
8370
plantGroup.append("circle")
8471
.attr("cx", centerX - 15)
8572
.attr("cy", stemY + 8)
8673
.attr("r", flowerSize * 0.6)
87-
.attr("fill", flowerColor)
88-
.attr("class", "plant_growth_flower");
74+
.attr("fill", flowerColor);
8975

9076
plantGroup.append("circle")
9177
.attr("cx", centerX + 15)
9278
.attr("cy", stemY + 12)
9379
.attr("r", flowerSize * 0.6)
94-
.attr("fill", flowerColor)
95-
.attr("class", "plant_growth_flower");
80+
.attr("fill", flowerColor);
9681
}
9782

9883
// Growth label

0 commit comments

Comments
 (0)