Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 1, 2024
1 parent 8f0a730 commit 1ec7599
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function arrayToCsv(data: number[][]): string {
row
.map(String) // convert every value to String
.map((v) => `"${v}"`) // quote it
.join(',') // comma-separated
.join(','), // comma-separated
)
.join('\n'); // rows starting on new lines
}
Expand Down Expand Up @@ -62,7 +62,7 @@ class DrawingApp {

this.img = fabric.Image.fromURL(
imageUrl.toString(),
this.updateImg.bind(this)
this.updateImg.bind(this),
);
// (img) => {
// this.up;
Expand Down Expand Up @@ -94,7 +94,7 @@ class DrawingApp {
return [circle.left, circle.top];
});
const url = URL.createObjectURL(
new Blob([arrayToCsv(positions)], { type: 'text/csv;charset=utf-8;' })
new Blob([arrayToCsv(positions)], { type: 'text/csv;charset=utf-8;' }),
);

// Create a link to download it
Expand All @@ -106,7 +106,7 @@ class DrawingApp {
});

const size_slider = document.getElementById(
'point-size-slider'
'point-size-slider',
) as HTMLInputElement;

size_slider.addEventListener('input', () => {
Expand All @@ -118,7 +118,7 @@ class DrawingApp {
});

const opacity_slider = document.getElementById(
'point-alpha-slider'
'point-alpha-slider',
) as HTMLInputElement;

opacity_slider.addEventListener('input', () => {
Expand Down Expand Up @@ -154,7 +154,7 @@ class DrawingApp {
{
scaleX: this.canvas.width / img.width,
scaleY: this.canvas.height / img.height,
}
},
);
this.canvas.renderAll();
}
Expand Down Expand Up @@ -207,7 +207,7 @@ class DrawingApp {
this.canvas.zoomToPoint(
// { x: this.canvas.width / 2, y: this.canvas.height / 2 },
{ x: this.canvas.width / 2, y: this.canvas.height / 2 },
zoom
zoom,
);
// } else if (delta > ) {
// // zooming in but mouse is outside image
Expand Down

0 comments on commit 1ec7599

Please sign in to comment.