1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-29 19:20:39 +02:00

polybezier

This commit is contained in:
Pomax
2016-01-10 13:46:59 -08:00
parent d6a335006e
commit 3c190e630c
7 changed files with 416 additions and 99 deletions

View File

@@ -24,7 +24,7 @@ var Graphic = React.createClass({
my:0,
cx:0,
cy:0,
mp: { x: 0, y: 0},
mp: false,
offset: { x: 0, y: 0},
lpts: [],
colorSeed: 0,
@@ -96,10 +96,11 @@ var Graphic = React.createClass({
this.dragging = false;
this.down = true;
this.lpts.forEach(p => {
this.lpts.forEach((p,idx) => {
if(Math.abs(this.mx - p.x)<10 && Math.abs(this.my - p.y)<10) {
this.moving = true;
this.mp = p;
this.mp_idx = idx;
this.cx = p.x;
this.cy = p.y;
}