Skip to content

ResolveGroup

@whittakertech/mosaic / resolveGroup

Function: resolveGroup()

function resolveGroup(
el,
root,
groupSelector): HTMLElement | null;

Defined in: drag/resolver.ts:90

Resolves the nearest group-container ancestor of an element, bounded by the Mosaic root.

Populates ResolvedTarget.group (#13). Returns null when selectors.group is not configured, or when no ancestor matches it before reaching root.

Parameters

el

HTMLElement

The element to resolve a group for

root

HTMLElement

The Mosaic root bounding the search

groupSelector

The active selectors.group value, if any

string | undefined

Returns

HTMLElement | null