Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zk-phi committed Oct 16, 2024
1 parent a8ffe3b commit 34a8abe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utils/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ export const fixDrawImage = (
if (params.sLeft < 0) {
params = {
...params,
sLeft: params.sLeft + (- params.sLeft), // = 0
tLeft: params.tLeft + (- params.sLeft) * xScale,
sWidth: params.sWidth - (- params.sLeft),
tWidth: params.tWidth - (- params.sLeft) * xScale,
sLeft: params.sLeft + (-params.sLeft), // = 0
tLeft: params.tLeft + (-params.sLeft) * xScale,
sWidth: params.sWidth - (-params.sLeft),
tWidth: params.tWidth - (-params.sLeft) * xScale,
};
}

if (params.sTop < 0) {
params = {
...params,
sTop: params.sTop + (- params.sTop), // = 0
tTop: params.tTop + (- params.sTop) * yScale,
sHeight: params.sHeight - (- params.sTop),
tHeight: params.tHeight - (- params.sTop) * yScale,
sTop: params.sTop + (-params.sTop), // = 0
tTop: params.tTop + (-params.sTop) * yScale,
sHeight: params.sHeight - (-params.sTop),
tHeight: params.tHeight - (-params.sTop) * yScale,
};
}

Expand Down

0 comments on commit 34a8abe

Please sign in to comment.