PDA

View Full Version : onDragEnd is not invoked if any other mouse button is clicked while dragging



Ikael
August 24th, 2014, 16:24
Not sure if this is issue or feature, but when dragging anything and you click any other mouse button, the dragging ends, but onDragEnd function is not invoked. Personally I believe it should be invoked. This causes issues for example in SW Adventure Deck where you could "lose" card when dragging it and accidentially clicking any other mouse button. The code expects the onDragEnd is invoked at the end.

Moon Wizard
August 24th, 2014, 19:45
Clicking another mouse button is considered a cancel of the drag.

If cards are "lost", the adventure deck may need to be adjusted to not "remove" cards until onDragEnd triggers.

Cheers,
JPG

Ikael
August 24th, 2014, 21:17
Clicking another mouse button is considered a cancel of the drag.

If cards are "lost", the adventure deck may need to be adjusted to not "remove" cards until onDragEnd triggers.

Cheers,
JPG

Thanks for info. The issue with adventure card dragging is that when dragging is initialized, the card is hidden from source and it seems that card is really dragged away from it, and it expects onDragEnd to be called to return it back to visible if target did not accept the card. This said, it really wants onDragEnd to be invoked. Anyways, I will leave this to Phantomwhale :)