Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
use whole numbers to draw image on canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
Niharika Khanna committed Feb 12, 2018
1 parent e574585 commit f3eed28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/src/pages/shot/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,19 +333,19 @@ exports.Editor = class Editor extends React.Component {
if (x < 0) {
return 0;
} else if (x > max) {
return max;
return Math.floor(max);
}
return x;
return Math.floor(x);
}

truncateY(y) {
const max = this.canvasHeight;
if (y < 0) {
return 0;
} else if (y > max) {
return max;
return Math.floor(max);
}
return y;
return Math.floor(y);
}

findClickedArea(e) {
Expand Down

0 comments on commit f3eed28

Please # to comment.