configureStructureViewItemProperties

How to get configureStructureViewItemProperties

import configureStructureViewItemProperties from 'fontoxml-families/src/configureStructureViewItemProperties.js'

Type: Function

Configure properties for elements in the structure view.

This can be used alongside configureAsStructureViewItem much like configureProperties can be used alongside the CVK families.

In addition to overriding specific properties from the base configuration, this function may also be used to configure properties for the source nodes in the documents hierarchy. Such properties may be used when the target of the corresponding hierarchy node is not available. Only the titleQuery (shared with the CVK) and the icon can currently be configured this way.

Except for the use case above, make sure that all structure view items configured using this function also have a matching configureAsStructureViewItem configuration.

Arguments

# Name Type Description
1. sxModule SxModule
2. selector XPathTest
3. options Object
  Members

Members

Name Type Description
[clickOperation] String | Null

The operation which should be called when the structure view item is clicked onin the structure view. This operation is called with two parameters: the NodeId of the node as contextNodeId and the HierarchyNodeId of the hierarchy node related to this structure view item as hierarchyNodeId. If the clickOperation is set to null, the structure view item is not clickable.

[icon] String

The icon of this structure view item

[isDraggable] Boolean

Whether this item is draggable. If it is, the item can be picked up by holding down the left mouse button and initiating a drag by moving the mouse. This allows the user to move the item to another position in the structure.

[isHiddenFromView] Boolean

Whether this item is hidden from view. If it is, its children are rendered in-place. This can be used to 'catch' the standard rendering kicking off from documentElement. Always use configureAsStructureViewItem to introduce new visible elements to the structure view.

[outputClass] String

The output class to set on this structure view item.

[priority] Number

The priority of the config

[recursionQuery] XPathQuery

The in-dom children of this structure view node. In the end, Only nodes which have configuration for the structure are rendered.

[titleQuery] XPathQuery

The titleQuery of the given structure view item. This is the same as the one in families

Was this page helpful?