How to use the @brainly/html-sketchapp.nodeTreeToSketchGroup function in @brainly/html-sketchapp

To help you get started, we’ve selected a few @brainly/html-sketchapp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisvxd / story2sketch / src / browser / page2layers.js View on Github external
nodes = document.querySelector(querySelector);
  }

  if (!nodes) {
    return null;
  }

  if (fixPseudo) {
    fixPseudoElements();
  }

  if (removePreviewMargin) {
    removeShowMainMargin();
  }

  const layer = nodeTreeToSketchGroup(nodes, {
    getGroupName: getNodeName,
    getRectangleName: getNodeName
  });

  const symbol = new SymbolMaster({ x, y });

  symbol.setName(name);
  symbol.addLayer(layer);

  return symbol.toJSON();
};