Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- draggable :: WriteAttr Element Bool
- droppable :: WriteAttr Element Bool
- dragData :: WriteAttr Element DragData
- type DragData = String
- drag :: Element -> Event DragData
- dragStart :: Element -> Event DragData
- dragEnd :: Element -> Event DragData
- drop :: Element -> Event DragData
- dragEnter :: Element -> Event DragData
- dragLeave :: Element -> Event DragData
- dragOver :: Element -> Event DragData
Synopsis
API for handling drag and drop operations.
See the documentation below for details on the drag and drop model.
WARNING: Events in this module may not behave as expected. The model is currently implemented in terms of HTML 5 drag and drop, but unfortunately, the HTML 5 specification for drag and drop is horrible and browser implementations are buggy.
Documentation
droppable :: WriteAttr Element Bool Source #
Enable or disable whether the element accepts drops.
An element with droppable
set to True
will receive
drop
, dragOver
, dragEnter
and dragLeave
events.
Child elements of a droppable
element may also be droppable
.
When dragging something over an element, the closest ancestor element
that is droppable
will be the target and receive corresponding
events.
dragData :: WriteAttr Element DragData Source #
Set the data that is transferred when dragging this element.
type DragData = String Source #
Data carried by a dragged element.
FIXME: Empty data is currently encoded by the empty String. Change this to 'Maybe String' instead.
drag :: Element -> Event DragData Source #
Occurs periodically while the element is being dragged around.
dragEnd :: Element -> Event DragData Source #
Dragging the element ends.
WARNING: This event can occur both before and after a corresponding drop
event.
drop :: Element -> Event DragData Source #
The drag and drop operation is being completed on this element.
dragEnter :: Element -> Event DragData Source #
The element is now the current target element for a drop
.
WARNING: This element is buggy when moving the mouse over child elements.