new (require("bajaux/container/wb/Clipboard"))()
- Description:
A fake Clipboard that uses BajaScript to support drag and drop in Workbench.
- Source:
Methods
clearData(mimeType)
- Description:
Clear the data from the clipboard for the specified format.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
mimeType |
String | The format of the data being cleared. |
getData(mimeType)
- Description:
Return data from the clipboard for the specified format.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
mimeType |
String | The format of the data to return. |
Returns:
the request data (or undefined if nothing can be found).
setData(mimeType, data)
- Description:
Adds the specified data to the clipboard.
- Source:
- See:
Parameters:
| Name | Type | Description |
|---|---|---|
mimeType |
String | The format of the data being added. |
data |
The data to be added to the clipboard. |
setDragImage()
- Description:
Sets a drag image (currently is a no-op).
- Source:
(static) dragover(x, y, navNodesStr) → {Promise}
- Description:
The drag over function to be exported for Workbench to use.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
x |
Number | The x co-ordinate of the drag. |
y |
Number | The y co-ordinate of the drag. |
navNodesStr |
String | The Nav Node JSON encoded in a String. |
Returns:
A promise that's resolved once the drag operation has completed.
- Type
- Promise
(static) drop(x, y, navNodesStr) → {Promise}
- Description:
The drop function to be exported for Workbench to use.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
x |
Number | The x co-ordinate of the drop. |
y |
Number | The y co-ordinate of the drop. |
navNodesStr |
String | The Nav Node JSON encoded in a String. |
Returns:
A promise that's resolved once the drag operation has completed.
- Type
- Promise