Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

fontScale

fontScale: any = null

d3 scale used for sizing font of labels, used by labelBuild, initialized once by getLabelFontScale.

Functions

Private _createVisibleTrace

  • _createVisibleTrace(nodeInstance: Node, startNodeParents: any, indexedStartNodeParents: Node[]): void
  • Colors the edges to connect the passed node to the start node. This is done by:

    a) Finding the first (visible) common parent in the rendered hierarchy. NB: There are 2 types of connections: 1) Direct connections between node A and B, marked below as II, 2) Connections from any node A to its parent, A'. Marked below as I and III. For type 2 connection you need to know the inner-nested node, the direct parent, and the ultimate destination of the connection.

    A_parent B_parent +--------+ +---------+ | | | | | +--+ I| II |III+--+ | | |A +---------->+B | | | +--+ | | +--+ | | | | | +--------+ +---------+

    b) Highlighting the direct connection between the parents of A and B, called A_parent and B_parent, s.t. A_parent and B_parent are children of the mutual parent of A and B found in a), marked above as II.

    c) Highlighting the connection from A to A_parent and B to B_parent (through all layers of parents between A and A_parent and B and B_parent, respectively). Marked above as I and III.

    Parameters

    • nodeInstance: Node

      The instance of the node to use as destination node, B.

    • startNodeParents: any

      Map of startNodeParent names to information objects about the parent.

    • indexedStartNodeParents: Node[]

      An array of all parents of the start node. This is required to find the child of the mutual parent which is a parent of the start node.

    Returns void

Private _findVisibleParentsFromOpNodes

  • _findVisibleParentsFromOpNodes(renderGraphInfo: any, nodeNames: string[]): object
  • Creates map { [name: string] -> Node } of all visible / rendered parents of the nodes identified by the node names passed in.

    Parameters

    • renderGraphInfo: any

      The information on the rendered graph.

    • nodeNames: string[]

      String array of node names.

    Returns object

    • [nodeName: string]: Node

_getAllContainedOpNodes

  • _getAllContainedOpNodes(nodeName: string, renderGraphInfo: RenderGraphInfo): Array<any>
  • Recursively find all op nodes contained by the node identified by the provided name.

    Parameters

    • nodeName: string

      The meta or op node of which the OpNode instances are required.

    • renderGraphInfo: RenderGraphInfo

      The rendered graph information object.

    Returns Array<any>

    An array of OpNodeImpl instances.

Private _markParentsOfNodes

  • _markParentsOfNodes(visibleNodes: object): void
  • Traverse through the parents of all nodes in the list and mark each encountered node as input-parent.

    Parameters

    • visibleNodes: object

      Map of input nodes, have to be visible/rendered when called.

      • [nodeName: string]: Node

    Returns void

addButton

  • addButton(selection: any, d: RenderNodeInfo, sceneElement: any): void
  • Add an expand/collapse button to a group node

    Parameters

    • selection: any

      The group node selection.

    • d: RenderNodeInfo

      Info about the node being rendered.

    • sceneElement: any

      polymer element.

    Returns void

addInteraction

  • addInteraction(selection: any, d: RenderNodeInfo, sceneElement: any, disableInteraction?: boolean): void
  • Fire node-* events when the selection is interacted.

    Parameters

    • selection: any
    • d: RenderNodeInfo
    • sceneElement: any
    • Optional disableInteraction: boolean

      When true, have the provided selection ignore all pointer events. Used for text labels inside of metanodes, which don't need interaction as their surrounding shape has interaction, and if given interaction would cause conflicts with the expand/collapse button.

    Returns void

buildGroup

  • buildGroup(sceneGroup: any, nodeData: RenderNodeInfo[], sceneElement: any): any
  • Select or Create a 'g.nodes' group to a given sceneGroup and builds a number of 'g.node' groups inside the group.

    Structure Pattern:

    ... ... node name ...

    Parameters

    • sceneGroup: any

      selection of the container

    • nodeData: RenderNodeInfo[]

      array of render node information to map

    • sceneElement: any

      polymer element

    Returns any

    selection of the created nodeGroups

buildShape

  • buildShape(nodeGroup: any, d: any, nodeClass: string): any
  • Select or append/insert shape for a node and assign renderNode as the shape's data.

    Parameters

    • nodeGroup: any
    • d: any

      Render node information.

    • nodeClass: string

      class for the element.

    Returns any

    Selection of the shape.

canBeInSeries

  • canBeInSeries(node: Node): boolean
  • Returns if a node can be part of a grouped series

    Parameters

    Returns boolean

enforceLabelWidth

  • enforceLabelWidth(txtElementSelection: d3.Selection, nodeType: NodeType | number, renderNodeInfo?: RenderNodeInfo): any
  • This function shortens text which would exceed the maximum pixel width of a label.

    Parameters

    • txtElementSelection: d3.Selection

      The text element containing the label's text as d3 selection.

    • nodeType: NodeType | number

      The type of the node the label belongs to. If the node is an annotation, the value is -1. Label widths are defined in layout.PARAMS.nodeSize.{meta|op|...}.maxLabelWidth for nodes and layout.PARAMS.annotations.labelWidth for annotations.

    • Optional renderNodeInfo: RenderNodeInfo

      The render information about the node, required to determine whether META nodes are collapsed or expanded.

    Returns any

getContainingSeries

  • Returns the SeriesNode that represents the series that the provided node is contained in (or itself if the provided node is itself a SeriesNode). Returns null if the node is not rendered as part of a series.

    Parameters

    Returns SeriesNode

getContextMenu

  • getContextMenu(node: Node, sceneElement: any): Array<object>
  • Returns the d3 context menu specification for the provided node.

    Parameters

    • node: Node
    • sceneElement: any

    Returns Array<object>

getFillForNode

  • getFillForNode(templateIndex: any, colorBy: any, renderInfo: RenderNodeInfo, isExpanded: boolean): string
  • Returns the fill color for the node given its state and the 'color by' option.

    Parameters

    • templateIndex: any
    • colorBy: any
    • renderInfo: RenderNodeInfo
    • isExpanded: boolean

    Returns string

getGroupSettingLabel

  • getGroupSettingLabel(node: Node): "Ungroup this series of nodes" | "Group this series of nodes"
  • Returns the label for a button to toggle the group setting of the provided node.

    Parameters

    Returns "Ungroup this series of nodes" | "Group this series of nodes"

getLabelFontScale

  • getLabelFontScale(sceneElement: any): any

getSeriesName

  • getSeriesName(node: Node): string
  • Returns the name of the possible grouped series containing this node. Returns null if the node cannot be part of a grouped series of nodes.

    Parameters

    Returns string

getStrokeForFill

  • getStrokeForFill(fill: string): any
  • Given a node's fill color/gradient, determine the stroke for the node.

    Parameters

    • fill: string

    Returns any

getVisibleParent

  • Find the parent of the passed in op node which is expanded. This is done by going through all parents until the parent's parent is expanded, thus finding the first unexpanded parent which is rendered on the screen.

    Parameters

    • renderGraphInfo: RenderGraphInfo

      The graph info object used to gain access to the render info of the parents.

    • currentNode: Node

      The node whose parent is to be found.

    Returns Node

    Node

labelBuild

  • labelBuild(nodeGroup: any, renderNodeInfo: RenderNodeInfo, sceneElement: any): any
  • Append svg text for label and assign data.

    Parameters

    • nodeGroup: any
    • renderNodeInfo: RenderNodeInfo

      The render node information for the label.

    • sceneElement: any

      polymer element.

    Returns any

labelPosition

  • labelPosition(nodeGroup: any, cx: number, cy: number, yOffset: number): void
  • Set label position of a given node group

    Parameters

    • nodeGroup: any
    • cx: number
    • cy: number
    • yOffset: number

    Returns void

nodeClass

position

stylize

  • stylize(nodeGroup: any, renderInfo: RenderNodeInfo, sceneElement: any, nodeClass?: any): void
  • Modify node style by toggling class and assign attributes (only for things that can't be done in css).

    Parameters

    • nodeGroup: any
    • renderInfo: RenderNodeInfo
    • sceneElement: any
    • Optional nodeClass: any

    Returns void

subsceneBuild

  • Update or remove the subscene of a render group node depending on whether it is a expanded. If the node is not a group node, this method has no effect.

    Parameters

    • nodeGroup: any

      selection of the container

    • renderNodeInfo: RenderGroupNodeInfo

      the render information for the node.

    • sceneElement: any

      polymer element.

    Returns any

    Selection of the subscene group, or null if node group does not have a subscene. Op nodes, bridge nodes and unexpanded group nodes will not have a subscene.

subscenePosition

traceAllInputsOfOpNode

  • traceAllInputsOfOpNode(renderGraphInfo: RenderGraphInfo, startNode: OpNode, allTracedNodes: Object): Object

traceInputs

  • Finds selected node and highlights all nodes which are providing direct or indirect input to the node and all edges connecting these nodes together and to the selected node.

    Parameters

    • renderGraphInfo: RenderGraphInfo

      Information on the rendered state of the graph.

    Returns void

Generated using TypeDoc