1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-25 23:59:02 +02:00

fricking debugging man

This commit is contained in:
Pomax
2020-08-08 13:08:30 -07:00
parent 3bb6785bd6
commit deda62b17b
2 changed files with 19 additions and 5 deletions

View File

@@ -36,10 +36,18 @@ class GraphicsAPI extends BaseAPI {
onMouseDown(evt) {
super.onMouseDown(evt);
const cdist = evt.targetTouches ? 10 : 5;
for (let i = 0, e = this.moveable.length, p; i < e; i++) {
p = this.moveable[i];
if (new Vector(p).dist(this.cursor) <= 5) {
console.log(`m check:`, p);
if (new Vector(p).dist(this.cursor) <= cdist) {
this.currentPoint = p;
console.log(`current point found`);
break;
}
}