Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

svgNamespace

svgNamespace: "http://www.w3.org/2000/svg" = "http://www.w3.org/2000/svg"

Functions

addGraphClickListener

  • addGraphClickListener(graphGroup: any, sceneElement: any): void
  • Adds a click listener to a group that fires a graph-select event

    Parameters

    • graphGroup: any
    • sceneElement: any

    Returns void

buildGroup

  • buildGroup(container: any, renderNode: RenderGroupNodeInfo, sceneElement: any, sceneClass: string): any
  • Select or create a sceneGroup and build/update its nodes and edges.

    Structure Pattern:

    ... stuff from tfgraph.scene.edges.build ... ... stuff from tfgraph.scene.nodes.build ... ... stuff from tfgraph.scene.nodes.build ... ... stuff from tfgraph.scene.nodes.build ...

    Parameters

    • container: any

      D3 selection of the parent.

    • renderNode: RenderGroupNodeInfo

      render node of a metanode or series node.

    • sceneElement: any

      polymer element.

    • sceneClass: string

      class attribute of the scene (default='scene').

    Returns any

fit

  • fit(svg: any, zoomG: any, d3zoom: any, callback: any): void
  • Helper method for fitting the graph in the svg view.

    Parameters

    • svg: any

      The main svg.

    • zoomG: any

      The svg group used for panning and zooming.

    • d3zoom: any

      The zoom behavior.

    • callback: any

      Called when the fitting is done.

    Returns void

panToNode

  • panToNode(nodeName: String, svg: any, zoomG: any, d3zoom: any): boolean
  • Helper method for panning the graph to center on the provided node, if the node is currently off-screen.

    Parameters

    • nodeName: String

      The node to center the graph on

    • svg: any

      The root SVG element for the graph

    • zoomG: any

      The svg group used for panning and zooming.

    • d3zoom: any

      The zoom behavior.

    Returns boolean

    True if the graph had to be panned to display the provided node.

position

  • Given a scene's svg group, set g.in-extract, g.coreGraph, g.out-extract svg groups' position relative to the scene.

    Parameters

    Returns void

positionButton

  • Helper for setting position of a svg expand/collapse button

    Parameters

    • button: any

      container group

    • renderNode: RenderNodeInfo

      the render node of the group node to position the button on.

    Returns void

positionEllipse

  • positionEllipse(ellipse: any, cx: number, cy: number, width: number, height: number): void
  • Helper for setting position of a svg ellipse

    Parameters

    • ellipse: any

      ellipse to set position of.

    • cx: number

      Center x.

    • cy: number

      Center x.

    • width: number

      Width to set.

    • height: number

      Height to set.

    Returns void

positionRect

  • positionRect(rect: any, cx: number, cy: number, width: number, height: number): void
  • Helper for setting position of a svg rect

    Parameters

    • rect: any

      rect to set position of.

    • cx: number

      Center x.

    • cy: number

      Center x.

    • width: number

      Width to set.

    • height: number

      Height to set.

    Returns void

selectChild

  • selectChild(container: any, tagName: string, className?: string | string[]): any
  • Given a container d3 selection, select a child element of a given tag and class. If multiple children matches the tag and class name, returns only the first one.

    Parameters

    • container: any
    • tagName: string

      tag name.

    • Optional className: string | string[]

      (optional) Class name or list of class names.

    Returns any

    selection of the element, or an empty selection

selectOrCreateChild

  • selectOrCreateChild(container: any, tagName: string, className?: string | string[], before?: any): any
  • Given a container d3 selection, select a child svg element of a given tag and class if exists or append / insert one otherwise. If multiple children matches the tag and class name, returns only the first one.

    Parameters

    • container: any
    • tagName: string

      tag name.

    • Optional className: string | string[]

      (optional) Class name or a list of class names.

    • Optional before: any

      (optional) reference DOM node for insertion.

    Returns any

    selection of the element

translate

  • translate(selection: any, x0: number, y0: number): void
  • Helper for adding transform: translate(x0, y0)

    Parameters

    • selection: any
    • x0: number
    • y0: number

    Returns void

Object literals

Class

Class: object

Enums element class of objects in the scene

BRIDGENODE

BRIDGENODE: string = "bridge"

ELLIPSISNODE

ELLIPSISNODE: string = "ellipsis"

METANODE

METANODE: string = "meta"

OPNODE

OPNODE: string = "op"

SERIESNODE

SERIESNODE: string = "series"

Annotation

Annotation: object

CONTROL_EDGE

CONTROL_EDGE: string = "annotation-control-edge"

EDGE

EDGE: string = "annotation-edge"

ELLIPSIS

ELLIPSIS: string = "annotation-ellipsis"

GROUP

GROUP: string = "annotation"

INBOX

INBOX: string = "in-annotations"

LABEL

LABEL: string = "annotation-label"

NODE

NODE: string = "annotation-node"

OUTBOX

OUTBOX: string = "out-annotations"

Edge

Edge: object

CONTAINER

CONTAINER: string = "edges"

GROUP

GROUP: string = "edge"

LINE

LINE: string = "edgeline"

REF_LINE

REF_LINE: string = "refline"

STRUCTURAL

STRUCTURAL: string = "structural"

Node

Node: object

BUTTON_CIRCLE

BUTTON_CIRCLE: string = "buttoncircle"

BUTTON_CONTAINER

BUTTON_CONTAINER: string = "buttoncontainer"

COLLAPSE_BUTTON

COLLAPSE_BUTTON: string = "collapsebutton"

COLOR_TARGET

COLOR_TARGET: string = "nodecolortarget"

CONTAINER

CONTAINER: string = "nodes"

EXPAND_BUTTON

EXPAND_BUTTON: string = "expandbutton"

GROUP

GROUP: string = "node"

LABEL

LABEL: string = "nodelabel"

SHAPE

SHAPE: string = "nodeshape"

Scene

Scene: object

CORE

CORE: string = "core"

GROUP

GROUP: string = "scene"

INEXTRACT

INEXTRACT: string = "in-extract"

OUTEXTRACT

OUTEXTRACT: string = "out-extract"

Subscene

Subscene: object

GROUP

GROUP: string = "subscene"

Generated using TypeDoc