UNPKG

ducjs

Version:

The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.

17 lines (16 loc) 512 B
import { isFrameLikeElement } from "../../types/elements/typeChecks"; export const getContainingFrame = (element, elementsMap) => { if (!element.frameId) { return null; } return (elementsMap.get(element.frameId) || null); }; export const getFrameLikeElements = (allElements) => { return allElements.filter((element) => isFrameLikeElement(element)); }; export const getFrameLikeTitle = (element) => { return element.label === null ? "Frame" : element.label; };