fix(*): Fix ability to click circle to spin

This commit is contained in:
Josh Creek
2022-10-09 12:53:47 +01:00
parent 983b097a3c
commit 0d641c4f66
+16 -18
View File
@@ -77,25 +77,23 @@ function makeArrowAndCircle(
.attr('x', 0) .attr('x', 0)
.attr('y', 0) .attr('y', 0)
.attr('preserveAspectRatio', 'xMaxYMax slice'); .attr('preserveAspectRatio', 'xMaxYMax slice');
}
container
.append('circle')
.attr('cx', 0)
.attr('cy', 0)
.attr('r', 60)
.style('fill', 'white')
.style('fill', 'url(#image)')
.style('cursor', 'pointer');
if (imageUrlForSpinner.length === 0) {
// spin text
container container
.append('text') .append('circle')
.attr('x', 0) .attr('cx', 0)
.attr('y', 10) .attr('cy', 0)
.attr('text-anchor', 'middle') .attr('r', 60)
.text('SPIN') .style('fill', 'white')
.style('font-weight', 'bold') .style('fill', 'url(#image)')
.style('font-size', '30px'); .style('cursor', 'pointer');
} else {
container
.append('circle')
.attr('cx', 0)
.attr('cy', 0)
.attr('r', 60)
.style('fill', 'white')
.style('cursor', 'pointer');
} }
} }