'justConnected' and 'disconnected' events are the ones you need to
register callbacks for.
this.joint = objectA.joint(objectB,
ARROW).registerForever(shapesArray);
this.joint.registerCallback('justConnected', function(side) {
console.log(side); // prints 'start' or 'end'
console.log(this); // prints object the joint gets connected to
});
this.joint.registerCallback('disconnected', function(side) {
console.log(side); // prints 'start' or 'end'
console.log(this); // prints object the joint gets disconnected
from
});
Please consult API reference for registerCallback() for other events.
Cheers,
David