@mathjax/src
    Preparing search index...

    The class for determining of a subtree can be collapsed

    Index

    Constructors

    Properties

    collapse: CollapseFunctionMap = ...

    The type-to-function mapping for semantic types

    The current node

    The current complexity

    The newly computed complexity

    complexity: ComplexityVisitor

    The complexity object containing this one

    cutoff: TypeRole<number> = ...

    The cutt-off complexity values for when a structure of the given type should collapse

    marker: TypeRole<string> = ...

    These are the characters to use for the various collapsed elements (if an object, then semantic-role is used to get the character from the object)

    NOCOLLAPSE: number = 10000000

    A constant to use to indicate no collapsing

    Methods

    • Parameters

      • node: MmlNode

        The node to check if its child is collapsible

      • n: number

        The position of the child node to check

      • m: number = 1

        The number of children node must have

      Returns MmlNode

      The child node that was collapsed (or null)

    • Check if a node should be collapsible and insert the maction node to handle that. Return the updated complexity.

      Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      Returns number

      The revised complexity

    • Check if the complexity exceeds the cutoff value for the type

      Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      • type: string

        The semantic type of the node

      Returns number

      The revised complexity

    • Parameters

      • node: MmlNode

        The node whose child text is needed

      • id: string

        The (semantic) id of the child needed

      Returns string

      The text of the specified child node

    • Add maction nodes to the nodes in the tree that can collapse

      Parameters

      • node: MmlNode

        The root of the tree to check

      • id: number

        The initial id to use

      Returns number

      The initial id used

    • Parameters

      • node: MmlNode

        The node to check

      • complexity: number

        The current complexity of the node

      • text: string

        The text to use for the collapsed node

      Returns number

      The revised complexity for the collapsed node

    • Parameters

      • node: MmlNode

        The node whose attribute is to be split

      • id: string

        The name of the data-semantic attribute to split

      Returns string[]

      Array of ids in the attribute split at commas

    • Parameters

      • complexity: number

        The current complexity

      • node: MmlNode

        The node to check

      • n: number

        The position of the child node to check

      • m: number = 1

        The number of children the node must have

      Returns number

      The updated complexity