Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IOptions

An options object for initializing a Drag object.

Hierarchy

  • IOptions

Index

Properties

Optional dragImage

dragImage: HTMLElement

An optional drag image which follows the mouse cursor.

Notes

The drag image can be any DOM element. It is not limited to image or canvas elements as with the native drag-drop APIs.

If provided, this will be positioned at the mouse cursor on each mouse move event. A CSS transform can be used to offset the node from its specified position.

The drag image will automatically have the p-mod-drag-image class name added.

The default value is null.

mimeData

mimeData: MimeData

The populated mime data for the drag operation.

Optional proposedAction

proposedAction: DropAction

The optional proposed drop action for the drag operation.

Notes

This can be provided as a hint to the drop targets as to which drop action is preferred.

The default value is 'copy'.

Optional source

source: any

An optional object which indicates the source of the drag.

Notes

For advanced applications, the drag initiator may wish to expose a source object to the drop targets. That object can be specified here and will be carried along with the drag events.

The default value is null.

Optional supportedActions

supportedActions: SupportedActions

The drop actions supported by the drag initiator.

Notes

A drop target must indicate that it intends to perform one of the supported actions in order to receive a drop event. However, it is not required to actually perform that action when handling the drop event. Therefore, the initiator must be prepared to handle any drop action performed by a drop target.

The default value is 'all'.

Generated using TypeDoc