0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-13 16:18:50 -05:00

added startdrag and enddrag events to Demo.events

This commit is contained in:
liabru 2014-12-02 21:38:02 +00:00
parent 440e9d28ee
commit 7c75614ae3

View file

@ -1132,6 +1132,24 @@
);
_sceneEvents.push(
// an example of using mouse events on a mouse
Events.on(_mouseConstraint, 'startdrag', function(event) {
console.log('startdrag', event);
})
);
_sceneEvents.push(
// an example of using mouse events on a mouse
Events.on(_mouseConstraint, 'enddrag', function(event) {
console.log('enddrag', event);
})
);
// scene code
var stack = Composites.stack(50, 100, 8, 4, 50, 50, function(x, y, column, row) {