Skip to content

Commit

Permalink
fix typescript parsing by adding missing eslintConfig to package.json…
Browse files Browse the repository at this point in the history
… after upgrade to create-react-app 4
  • Loading branch information
cinnamon-bun committed Apr 11, 2021
1 parent 3235b3c commit fa19712
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@
"not dead",
"not ie <= 11",
"not op_mini all"
]
],
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
}
}
5 changes: 2 additions & 3 deletions src/dial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ interface DialProps {
}
export let Dial = (props: DialProps) => {
let { cx, cy, radMin, radMax, ticks, textScale, textAlign } = props;
let textScale2 = 0.6;
if (textScale !== undefined) { textScale2 = textScale; }
if (textScale === undefined) { textScale = 0.6; }

let tickAngleWidth = 360 / ticks.length;
let textRotExtra =
Expand All @@ -50,7 +49,7 @@ export let Dial = (props: DialProps) => {
<text x={cx} y={cy - (radMin + radMax)/2}
textAnchor={textAlign === 'left' ? 'left' : 'middle'}
dominantBaseline="mathematical"
fontSize={(radMax - radMin) * textScale2}
fontSize={(radMax - radMin) * (textScale as number)}
style={{
stroke: 'none',
fill: tick.cText || cInk,
Expand Down

0 comments on commit fa19712

Please sign in to comment.