Skip to content

Commit 0c3d6b4

Browse files
committed
4hm3d told me to turn it into an M. enjoy.
1 parent c314eff commit 0c3d6b4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/util/Canvas.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,18 @@ const checkOnImageMap = (x: number, y: number) => {
346346

347347
const unit = smallestDimension / 100;
348348

349+
// borders
349350
if (x < x_offset || x > window.innerWidth - x_offset || y < y_offset || y > window.innerHeight - y_offset) {
350351
return false;
351352
}
352-
if (Math.abs(x - x_center) < unit * 20 && Math.abs(y - y_center) < unit * 20) {
353+
354+
// center triangle
355+
if ((Math.abs(x - x_center) / -(y - y_center / 1.5) > 1 || y > y_center / 1.5) && (Math.abs(x - x_center) / -(y - y_center- y_center * 0.25) < 1 && y < y_center*1.25)) {
353356
return true;
354357
}
355-
if (Math.abs(x - x_center) >= unit * 20) {
358+
359+
// bars
360+
if (Math.abs(x - x_center) >= unit * 30) {
356361
return true;
357362
}
358363
return false;

0 commit comments

Comments
 (0)