new (require("bajaux/dragdrop/NavNodeEnvelope"))(arr)
- Description:
Envelope for transforming raw JSON into NavNode instances, or vice versa.
- Source:
Extends:
Parameters:
| Name | Type | Description |
|---|---|---|
arr |
Array.<Object> | Array.<baja.NavNode> | either an array of raw |
Throws:
-
if a non-Array given
- Type
- Error
Extends
Methods
getMimeType() → {string}
- Source:
- Overrides:
Returns:
niagara/navnodes
- Type
- string
toJson() → {Promise.<Array.<object>>}
- Description:
Get the JSON representations of the envelope's NavNodes:
[{ "name": "navName", "displayName": "navDisplayName", "description": "navDescription", "icon": "navIcon", "ord": "navOrd", "typeSpec": "typeSpec", "kids": [ \/* child nav node JSON objects *\/ ] }]
- Source:
- Overrides:
Returns:
promise to be resolved with an array of raw
JSON objects
- Type
- Promise.<Array.<object>>
toValues() → {Promise.<Array.<baja.NavNode>>}
- Description:
Get the actual NavNodes represented by this envelope.
- Source:
- Overrides:
Returns:
promise to be resolved with an array of
NavNode instances
- Type
- Promise.<Array.<baja.NavNode>>