Skip to content

Commit 449bfa3

Browse files
committed
Fix linters
1 parent 1ec0dc7 commit 449bfa3

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

src/typings/env.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
declare module "*.css" {
2+
const content: { [className: string]: string }
3+
export default content
4+
}
5+
6+
declare module "*.png" {
7+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
8+
const content: any
9+
export default content
10+
}

src/typings/styles.d.ts

-4
This file was deleted.

src/view/Mafs.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ function MafsCanvas({
174174
const ySpan = yMax - yMin
175175

176176
const viewTransform = React.useMemo(() => {
177-
const scaleX = (1 / xSpan) * width
178-
const scaleY = (-1 / ySpan) * height
177+
const scaleX = round((1 / xSpan) * width, 5)
178+
const scaleY = round((-1 / ySpan) * height, 5)
179179
return vec.matrixBuilder().scale(scaleX, scaleY).get()
180180
}, [height, width, xSpan, ySpan])
181181

182-
const viewBoxX = (xMin / (xMax - xMin)) * width
183-
const viewBoxY = (yMax / (yMin - yMax)) * height
182+
const viewBoxX = round((xMin / (xMax - xMin)) * width, 10)
183+
const viewBoxY = round((yMax / (yMin - yMax)) * height, 10)
184184

185185
const inverseViewTransform = vec.matrixInvert(viewTransform)
186186

0 commit comments

Comments
 (0)