Skip to content

Commit ebbb180

Browse files
committed
- improved point selection
1 parent aa1cf80 commit ebbb180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/shape_matching.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ <h3>References</h3>
330330
p.yOld = p.y;
331331

332332
// integrate position
333-
if (gui.simulateMotion)
333+
if ((gui.simulateMotion) && (i != gui.selectedParticle))
334334
{
335335
p.x = p.x + dt * p.vx;
336336
p.y = p.y + dt * p.vy;
@@ -377,7 +377,7 @@ <h3>References</h3>
377377
part.goal_x = goal[0] + t_x;
378378
part.goal_y = goal[1] + t_y;
379379

380-
if (gui.simulateMotion)
380+
if ((gui.simulateMotion) && (i != gui.selectedParticle))
381381
{
382382
part.vx += this.stiffness/this.timeStepSize * (part.goal_x - part.x);
383383
part.vy += this.stiffness/this.timeStepSize * (part.goal_y - part.y);

0 commit comments

Comments
 (0)