protected override bool NodeScansChildren(FigmaNode currentNode, CustomViewConverter converter, FigmaViewRendererServiceOptions options)
        {
            if (currentNode.IsFigmaImageViewNode())
            {
                return(false);
            }

            return(base.NodeScansChildren(currentNode, converter, options));
        }
示例#2
0
        protected virtual bool NodeScansChildren(FigmaNode currentNode, CustomViewConverter converter, FigmaViewRendererServiceOptions options)
        {
            if (converter == null)
            {
                return(false);
            }

            if (!converter.ScanChildren(currentNode))
            {
                return(false);
            }

            if (!options.ScanChildrenFromFigmaInstances && (currentNode is FigmaInstance || currentNode is FigmaComponentEntity))
            {
                return(false);
            }

            return(true);
        }
示例#3
0
 protected virtual IEnumerable <FigmaNode> GetCurrentChildren(FigmaNode currentNode, FigmaNode parentNode, CustomViewConverter converter, FigmaViewRendererServiceOptions options)
 {
     if (currentNode is IFigmaNodeContainer nodeContainer)
     {
         return(nodeContainer.children);
     }
     return(Enumerable.Empty <FigmaNode>());
 }
        protected override IEnumerable <FigmaNode> GetCurrentChildren(FigmaNode currentNode, FigmaNode parentNode, CustomViewConverter converter, FigmaViewRendererServiceOptions options)
        {
            var windowContent = currentNode.GetWindowContent();

            if (windowContent != null && windowContent is IFigmaNodeContainer nodeContainer)
            {
                return(nodeContainer.children);
            }
            return(base.GetCurrentChildren(currentNode, parentNode, converter, options));
        }