voltmx.dragDrop Namespace
The voltmx.dragdrop Namespace contains the following API elements.
Functions
The voltmx.dragdrop Namespace contains the following functions.
voltmx.dragdrop.DragInteraction
This function creates a new DragInteraction object and attaches the DragInteraction object to a widget.
Syntax
Input Parameters
Parameters | Description |
---|---|
widget | The widget that has to be made draggable. |
callbacks | This is a dictionary with the following keys: itemsForBeggining(JavaScript function) [Mandatory] : In this JS function, you can return the data (dictionary of the supported format), which is to be sent (JSON/filepath). previewForLifting (JavaScript function) [Mandatory]: This callback should return the preview that is to be shown while dragging on the screen. onLiftBeginAnimate (JavaScript function) [Optional]: Any Volt MX Iris supported animations that can be done when the lift just started. onLiftBeginAnimationComplete (JavaScript function) [Optional]: Animations that can be configured after the lift animations have been completed. previewForCancel (JavaScript function) [Optional]: This callback returns the preview when the dragging action is canceled. onCancelAnimate (JavaScript function) [Optional]: Any Volt MX Iris supported animations that can be done when the dragging is canceled. onCancelAnimationComplete (JavaScript function) [Optional]: Any Volt MX Iris supported animations that can be done after the cancellation process has been completed. |
Example
Return Values
- Success: A newly created DragInteraction object.
- Failure: null
Platform Availability
- iOS 11
voltmx.dragdrop.DropInteraction
This function creates a new DropInteraction object and attaches it to a widget.
Syntax
Input Parameters
Parameters | Description |
---|---|
widget | The widget that has to be made droppable. |
callbacks | This is a JSON dictionary with the following keys: performDrop(JavaScript function) [Mandatory] : This JS function gets data (JSON/filepath) as an argument.previewForDrop (JavaScript function) [Optional]: The drop preview that can be configured while dropping the data with the default preview.onBeginDropAnimate (JavaScript function) [Optional]: Any Volt MX Iris supported animations that can be configured while dropping.onBeginDropAnimationComplete (JavaScript function) [Optional]: Animations that can be configured after the drop animations have been completed.concludeDrop (JavaScript function) [Optional]: This callback is invoked after the dropping action is successfully completed. |
Example
Return Values
- Success: A newly created DropInteraction object.
- Failure: null
Platform Availability
- iOS 11
voltmx.dragdrop.removeDragInteraction
This function detaches the DragInteraction object from the widget.
Syntax
Input Parameters
None
Example
Return Values
None
Platform Availability
- iOS 11
voltmx.dragdrop.removeDropInteraction
This function detaches the DropInteraction object from the widget.
Syntax
Input Parameters
None
Example
Return Values
None
Platform Availability
- iOS 11