MCPcopy
hub / github.com/clientIO/joint / defaultSelector

Function defaultSelector

packages/joint-react/src/hooks/use-elements.ts:12–16  ·  view source on GitHub ↗

* Default selector function to return all elements. * @param items - The items to select from. * @returns - The selected items.

(
  items: CellMap<Elements>
)

Source from the content-addressed store, hash-verified

10 * @returns - The selected items.
11 */
12function defaultSelector<Elements extends GraphElement = GraphElement>(
13 items: CellMap<Elements>
14): Elements[] {
15 return items.map((item) => item) as Elements[];
16}
17/**
18 * A hook to access `dia.graph` elements
19 *

Callers

nothing calls this directly

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected