Skip to content
Discussion options

You must be logged in to vote

Only consecutive pointerdown, pointermove and pointerup events can share information through the evt.data object. See docs.

It's a feature we preserved when migrating from jQuery.

When the user starts dragging an element (pointerdown), we attach pointermove and pointerup listeners and make them share the data object.

function onPointerDown() {
  const data = {};
  paper.$el.on('pointermove', '.joint-element', data, onPointerMove);
  paper.$el.on('pointerup', '.joint-element', data, onPointerUp);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by frnora
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants