UNPKG

@gravity-ui/graph

Version:

Modern graph editor component

10 lines (9 loc) 322 B
export function selectBlockList(graph) { return graph.rootStore.blocksList; } export function selectBlockById(graph, id) { return selectBlockList(graph).$blocksMap.value.get(id); } export function selectBlockAnchor(graph, blockId, anchorId) { return selectBlockById(graph, blockId)?.getAnchorById(anchorId); }