Exemple #1
0
        protected virtual bool NodeScansChildren(FigmaNode currentNode, NodeConverter converter, ViewRenderServiceOptions options)
        {
            if (converter == null)
            {
                return(false);
            }

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

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

            // This will not be used by the ViewRenderService when SkipsNode returns true. Added here
            // in case something calls NodeScansChildren directly.
            if (currentNode.IsRenderSkipped())
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
 protected virtual bool SkipsNode(FigmaNode currentNode, ViewNode parent, ViewRenderServiceOptions options)
 {
     if (options != null && options.ToIgnore != null && options.ToIgnore.Contains(currentNode))
     {
         return(true);
     }
     if (currentNode.IsRenderSkipped())
     {
         return(true);
     }
     return(false);
 }