stopDrag method

void stopDrag()

Stops the current drag operation, if this DisplayObject is currently being dragged. Removes the mouse move event listener and sets the current drag object to null. Does nothing if this DisplayObject is not currently being dragged.

Implementation

void stopDrag() {
  if (this == $currentDrag && inStage) {
    stage!.onMouseMove.remove(_handleDrag);
    $currentDrag = null;
  }
}