Commit 5d051d97 authored by Hauk Olaussen's avatar Hauk Olaussen
Browse files

Changed some variablenames that were at the risk of being misinterpreted...

Changed some variablenames that were at the risk of being misinterpreted (their names were already declared in the upper scope)
parent 8ba945f0
......@@ -245,11 +245,11 @@ const App: React.FC = () => {
changeFont(config.font, true);
};
const changeFont = (font: Font, force: boolean = false) => {
setFont(font);
document.getElementById("lines")!.style.fontFamily = font;
const changeFont = (newFfont: Font, force: boolean = false) => {
setFont(newFfont);
document.getElementById("lines")!.style.fontFamily = newFfont;
if (force) {
updateHistory(theme, color, font);
updateHistory(theme, color, newFfont);
}
};
......
......@@ -146,7 +146,7 @@ const draw2: AnimationFunction = (
) as HTMLCanvasElement;
const ctx: CanvasRenderingContext2D = canvas.getContext("2d")!;
const amountCircles: number = 20;
const circleRadius: number = 20;
const radius: number = 20;
const pathRadius: number = 150;
const pathRadiusDelta: number = 80;
const spinSpeed: number = 0.004;
......@@ -170,7 +170,7 @@ const draw2: AnimationFunction = (
canvas.height / 2 +
(pathRadius + Math.sin(timeStamp * shrinkSpeed) * pathRadiusDelta) *
Math.sin(angle);
ctx.arc(xPos, yPos, circleRadius, 0, 2 * Math.PI);
ctx.arc(xPos, yPos, radius, 0, 2 * Math.PI);
ctx.fill();
ctx.stroke();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment