getClosestStructureViewItem

Type: Function

How to get getClosestStructureViewItem?

JavaScript

import getClosestStructureViewItem from 'fontoxml-structure/src/getClosestStructureViewItem.js'

Return information about the structure view item that is the closest ancestor of the given node.

Arguments

  1. nodeId

    (Required)

    Type: NodeId

  2. hierarchyNodeId

    (Optional)

    Can be used to disambiguate cases where documents occur multiple times.

Returns

Type: Object | NULL

The hierarchy node ID and node ID of the closest item.