Type Editor / @type-editor/viewdesc / ViewDescUtil / ViewDescUtil
Class: ViewDescUtil
Defined in: ViewDescUtil.ts:8
Constructors
Constructor
ts
new ViewDescUtil(): ViewDescUtil;Returns
ViewDescUtil
Methods
nearestNodeViewDesc()
ts
static nearestNodeViewDesc(viewDesc, dom): NodeViewDesc;Defined in: ViewDescUtil.ts:28
Scan up the DOM tree to find the first node view description that is a descendant of this one.
Parameters
| Parameter | Type | Description |
|---|---|---|
viewDesc | PmViewDesc | - |
dom | Node | The DOM node to start from |
Returns
The nearest node view description, or undefined if none found
nearestViewDesc()
ts
static nearestViewDesc(viewDesc, dom): ViewDesc;Defined in: ViewDescUtil.ts:17
Scan up the DOM tree to find the first view description that is a descendant of this one.
Parameters
| Parameter | Type | Description |
|---|---|---|
viewDesc | PmViewDesc | - |
dom | Node | The DOM node to start from |
Returns
The nearest view description, or undefined if none found