@maxgraph/core
    Preparing search index...

    Function findTreeRoots

    • Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.

      Parameters

      • graph: AbstractGraph

        the Graph to use for the traversal.

      • parent: Cell

        Cell whose children should be checked.

      • isolate: boolean = false

        Optional boolean that specifies if edges should be ignored if the opposite end is not a child of the given parent cell. Default is false.

      • invert: boolean = false

        Optional boolean that specifies if outgoing or incoming edges should be counted for a tree root. If false then outgoing edges will be counted. Default is false.

      Returns Cell[]