Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MainFrame

Hierarchy

Index

Constructors

constructor

Properties

MAX_LABEL_LEN

MAX_LABEL_LEN: number = 15

Protected _ctrls

_ctrls: Map<string, Control> = new Map<string, Control>()

Methods

Protected _notifyControls

  • _notifyControls(event: string, extra?: object): void
  • Parameters

    • event: string
    • Optional extra: object

    Returns void

addControl

  • addControl<T>(ctrl: T): T
  • Type parameters

    • T: Control

    Parameters

    • ctrl: T

    Returns T

Protected addDocumentControls

  • addDocumentControls(elements: JQuery<HTMLElement>, extra: object): void
  • Parameters

    • elements: JQuery<HTMLElement>
    • extra: object

    Returns void

clearScreen

  • clearScreen(): void

connectService

  • connectService(service: GraphService, callback: any): void

deleteNodes

  • deleteNodes(filter: function): void
  • delete matched nodes

    Parameters

    • filter: function

      a function tells id the node should be deleted, set undefined if want to delete all

        • (node: any): boolean
        • Parameters

          • node: any

          Returns boolean

    Returns void

emit

  • emit(event: string, args: object): void
  • Parameters

    • event: string
    • args: object

    Returns void

fire

  • fire(event: string, extra?: object): void
  • Parameters

    • event: string
    • Optional extra: object

    Returns void

fits

  • fits(nodeIds: string[], animation?: boolean): void
  • Parameters

    • nodeIds: string[]
    • Default value animation: boolean = false

    Returns void

focusEdges

  • focusEdges(edgeIds: string[]): void

focusNodes

  • focusNodes(nodeIds: string[]): void

getGraphService

getNodeById

  • getNodeById(nodeId: string): Node

getRequiredControl

  • getRequiredControl(name: string): Control

getRequiredControlLike

  • getRequiredControlLike<T>(control: T): T
  • Type parameters

    • T: Control

    Parameters

    • control: T

    Returns T

getScreenData

highlightNodes

  • highlightNodes(nodeIds: string[]): void

insertEdges

  • insertEdges(edges: any[]): void

insertNodes

  • insertNodes(nodes: any[]): string[]
  • insert a set of nodes, if some nodes exists, ignore the errors

    Parameters

    • nodes: any[]

      nodes to be inserted

    Returns string[]

    new node ids (without which exist already)

loadGraph

  • loadGraph(options: any, callback: function): boolean
  • load graph data and show network in current format

    Parameters

    • options: any
    • callback: function
        • (): void
        • Returns void

    Returns boolean

loadGraphOld

  • loadGraphOld(options: any, callback: function): boolean
  • load graph data and show network in current format

    Parameters

    • options: any
    • callback: function
        • (): void
        • Returns void

    Returns boolean

lockScale

  • lockScale(minScale: number, maxScale?: number): void
  • Parameters

    • minScale: number
    • Optional maxScale: number

    Returns void

notifyClearAll

  • notifyClearAll(): void

off

  • off(event: string, listener?: function): Function[]

on

  • on(event: string, listener: function): void

placeNodes

  • placeNodes(nodeIds: string[]): void

redraw

  • redraw(): void

removeControlLike

  • removeControlLike<T>(control: T): void
  • Type parameters

    • T: Control

    Parameters

    • control: T

    Returns void

scaleTo

  • scaleTo(scale: number): void

search

  • search(keyword: any, callback: function): void

searchImage

  • searchImage(image: any, callback: function): void

setDynamic

  • setDynamic(dy: boolean): void

showNodesOfCategory

  • showNodesOfCategory(className: string, showOrNot: boolean, callback?: function): void
  • Parameters

    • className: string
    • showOrNot: boolean
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

updateEdges

  • updateEdges(updates: any[]): void

updateGraph

  • updateGraph(showGraphOptions: FRAME_OPTIONS | Function, callback?: function): void
  • Parameters

    • showGraphOptions: FRAME_OPTIONS | Function
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

updateNetworkOptions

updateNodes

  • updateNodes(updates: any[]): void

updateTheme

  • updateTheme(theme: Theme | Function | any | String): void
  • Parameters

    • theme: Theme | Function | any | String

    Returns void