mirror of
https://github.com/jcreek/SelectionWheel.git
synced 2026-07-13 11:13:45 +00:00
chore(*): Fix linting errors
This commit is contained in:
+5
-1
@@ -28,7 +28,7 @@ function rotTween(to) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopSpinning() {
|
function stopSpinning() {
|
||||||
console.log('done');
|
// console.log('done');
|
||||||
const chartElement = document.getElementById('chart');
|
const chartElement = document.getElementById('chart');
|
||||||
chartElement.remove();
|
chartElement.remove();
|
||||||
const questionElement = document.getElementById('question');
|
const questionElement = document.getElementById('question');
|
||||||
@@ -110,8 +110,11 @@ function drawWheel() {
|
|||||||
arcs
|
arcs
|
||||||
.append('text')
|
.append('text')
|
||||||
.attr('transform', (d) => {
|
.attr('transform', (d) => {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
d.innerRadius = 0;
|
d.innerRadius = 0;
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
d.outerRadius = r;
|
d.outerRadius = r;
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
d.angle = (d.startAngle + d.endAngle) / 2;
|
d.angle = (d.startAngle + d.endAngle) / 2;
|
||||||
return `rotate(${(d.angle * 180) / Math.PI - 90})translate(${
|
return `rotate(${(d.angle * 180) / Math.PI - 90})translate(${
|
||||||
d.outerRadius - 10
|
d.outerRadius - 10
|
||||||
@@ -120,6 +123,7 @@ function drawWheel() {
|
|||||||
.attr('text-anchor', 'end')
|
.attr('text-anchor', 'end')
|
||||||
.text((d, i) => data[i].label);
|
.text((d, i) => data[i].label);
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function spin(d) {
|
function spin(d) {
|
||||||
container.on('click', null);
|
container.on('click', null);
|
||||||
// all slices have been seen, all done
|
// all slices have been seen, all done
|
||||||
|
|||||||
Reference in New Issue
Block a user