Skip to content

Commit bb83f48

Browse files
committed
Testing Pointer events.
1 parent 5f03d2c commit bb83f48

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/physics/matter-js/PointerConstraint.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ var PointerConstraint = new Class({
223223
// Pointer is up / released
224224
if (constraint.bodyB)
225225
{
226+
this.world.emit('enddrag', constraint.bodyB, constraint);
226227
constraint.bodyB = null;
227228
}
228229
}
@@ -239,6 +240,8 @@ var PointerConstraint = new Class({
239240

240241
constraint.pointA.x = pos.x;
241242
constraint.pointA.y = pos.y;
243+
244+
this.world.emit('drag', constraint.bodyB, constraint);
242245
}
243246
else
244247
{
@@ -254,6 +257,7 @@ var PointerConstraint = new Class({
254257
{
255258
if (this.getBodyPart(body, pos))
256259
{
260+
this.world.emit('startdrag', body, constraint);
257261
break;
258262
}
259263
}

0 commit comments

Comments
 (0)