# MouseDrag proc (atom)

Source: https://ref.dm-lang.org/atom/proc/MouseDrag

### Format
> `MouseDrag(over_object,src_location,over_location,src_control,over_control,params)`

### Args
- `over_object`: the object under the mouse pointer
- `src_location`: the turf, stat panel, grid cell, etc. from where the src object was dragged
- `over_location`: the turf, stat panel, grid cell, etc. containing the object under the mouse pointer
- `src_control`: The id of the skin control the object was dragged from
- `over_control`: The id of the skin control the object was dragged over
- `params`: other parameters including mouse/keyboard flags, icon offsets, etc.; see [mouse handling](https://ref.dm-lang.org/DM/mouse/index.md)


This is called while dragging this object by pressing and holding the left mouse button over the object and moving the mouse. The over_object may be null if dragging over a stat panel or over other empty space.

The over_control argument may be null if dragging over a control that isn't a valid [drop zone](https://ref.dm-lang.org/skin/param/drop-zone.md)

[, or outside the window or onto an area like the titlebar. In these cases `MouseDrop()` is only called for consistency, so you know a drag operation has ended. This only happens if the operation was recognized as a drag, causing `MouseDrag()` or an equivalent mouse macro to fire (if either is present).

Don't define this unless you need it, because it generates extra communication that is otherwise avoided. Most operations can be done through `Click()`, `DblClick()`, and `MouseDrop()`. The other procedures are simply available for completeness.

](https://ref.dm-lang.org/skin/param/drop-zone.md)

### See also
- [Click proc (atom)](https://ref.dm-lang.org/atom/proc/Click.md)
- [DblClick proc (atom)](https://ref.dm-lang.org/atom/proc/DblClick.md)
- [MouseDown proc (atom)](https://ref.dm-lang.org/atom/proc/MouseDown.md)
- [MouseDrag proc (client)](https://ref.dm-lang.org/client/proc/MouseDrag.md)
- [MouseDrop proc (atom)](https://ref.dm-lang.org/atom/proc/MouseDrop.md)
- [MouseEntered proc (atom)](https://ref.dm-lang.org/atom/proc/MouseEntered.md)
- [MouseExited proc (atom)](https://ref.dm-lang.org/atom/proc/MouseExited.md)
- [MouseMove proc (atom)](https://ref.dm-lang.org/atom/proc/MouseMove.md)
- [MouseUp proc (atom)](https://ref.dm-lang.org/atom/proc/MouseUp.md)
- [MouseWheel proc (atom)](https://ref.dm-lang.org/atom/proc/MouseWheel.md)
- [mouse_drag_pointer var (atom)](https://ref.dm-lang.org/atom/var/mouse_drag_pointer.md)
- [mouse_drop_pointer var (atom)](https://ref.dm-lang.org/atom/var/mouse_drop_pointer.md)
- [mouse_drop_zone var (atom)](https://ref.dm-lang.org/atom/var/mouse_drop_zone.md)
- [mouse_opacity var (atom)](https://ref.dm-lang.org/atom/var/mouse_opacity.md)
- [mouse_over_pointer var (atom)](https://ref.dm-lang.org/atom/var/mouse_over_pointer.md)
- [show_popup_menus var (client)](https://ref.dm-lang.org/client/var/show_popup_menus.md)
