Refactoring
Emit event when drag ends
Should not emit drag-ended event when no dragging has occured.