|
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 | | -`); |
13 | 1 |
|
14 | 2 | const potWidth = options.potWidth || 100; |
15 | 3 | const potHeight = options.potHeight || 40; |
@@ -76,23 +64,20 @@ if (data > 0.5) { |
76 | 64 | .attr("cx", centerX) |
77 | 65 | .attr("cy", stemY - 8) |
78 | 66 | .attr("r", flowerSize) |
79 | | - .attr("fill", flowerColor) |
80 | | - .attr("class", "plant_growth_flower"); |
| 67 | + .attr("fill", flowerColor); |
81 | 68 |
|
82 | 69 | // Leaf flowers |
83 | 70 | plantGroup.append("circle") |
84 | 71 | .attr("cx", centerX - 15) |
85 | 72 | .attr("cy", stemY + 8) |
86 | 73 | .attr("r", flowerSize * 0.6) |
87 | | - .attr("fill", flowerColor) |
88 | | - .attr("class", "plant_growth_flower"); |
| 74 | + .attr("fill", flowerColor); |
89 | 75 |
|
90 | 76 | plantGroup.append("circle") |
91 | 77 | .attr("cx", centerX + 15) |
92 | 78 | .attr("cy", stemY + 12) |
93 | 79 | .attr("r", flowerSize * 0.6) |
94 | | - .attr("fill", flowerColor) |
95 | | - .attr("class", "plant_growth_flower"); |
| 80 | + .attr("fill", flowerColor); |
96 | 81 | } |
97 | 82 |
|
98 | 83 | // Growth label |
|
0 commit comments