Skip to content

Commit

Permalink
Fix linters
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpetryk committed Oct 20, 2024
1 parent 1ec0dc7 commit 449bfa3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
10 changes: 10 additions & 0 deletions src/typings/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare module "*.css" {
const content: { [className: string]: string }
export default content
}

declare module "*.png" {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
const content: any
export default content
}
4 changes: 0 additions & 4 deletions src/typings/styles.d.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/view/Mafs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ function MafsCanvas({
const ySpan = yMax - yMin

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

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

const inverseViewTransform = vec.matrixInvert(viewTransform)

Expand Down

0 comments on commit 449bfa3

Please sign in to comment.