Esempio n. 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);
        }
Esempio n. 2
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);
            }

            return(true);
        }