Home Reference Source Test Repository
public class | source

SidebarSelect

Extends:

SidebarContent → SidebarSelect

Sidebar content class for handling selected items. This sidebar is used by the SelectTool.

Constructor Summary

Public Constructor
public

constructor(graph: Graph)

Constructs a SidebarSelect instance.

Member Summary

Public Members
public

Method Summary

Public Methods
public

Called to initially display the sidebar.

public

Get HTML for displaying a form for editing Edge fields.

public

Get HTML for displaying Graph data.

public

Get HTML for displaying a form for editing Label fields.

public

Get HTML for displaying a form for editing Node fields.

public

update(obj: Node | Edge)

Update the sidebar with the selected object.

public

Called when an 'input' or 'change' event is triggered by a form input.

Inherited Summary

From class SidebarContent
public

graph: *

public

tabs: *

public

changeGraph(newGraph: Graph)

Change the Graph object reference stored to the new one.

public abstract

Display the sidebar.

public abstract

update()

Update the sidebar state.

Public Constructors

public constructor(graph: Graph) source

Constructs a SidebarSelect instance.

Override:

SidebarContent#constructor

Params:

NameTypeAttributeDescription
graph Graph

The current Graph object.

Public Members

public selectedObject: * source

Public Methods

public display() source

Called to initially display the sidebar. Also adds event listeners to the forms.

Override:

SidebarContent#display

public displayEdge(edge: Edge): string source

Get HTML for displaying a form for editing Edge fields.

Params:

NameTypeAttributeDescription
edge Edge

The Edge object to display.

Return:

string

HTML string of a form with inputs for the Edge's fields.

public displayGraph(graph: Graph): string source

Get HTML for displaying Graph data. This will be used when nothing is selected.

Params:

NameTypeAttributeDescription
graph Graph

The Graph to display data for.

Return:

string

HTML string to set as the sidebar content.

public displayLabel(label: Label): string source

Get HTML for displaying a form for editing Label fields.

Params:

NameTypeAttributeDescription
label Label

The Label object to display.

Return:

string

HTML string of a form with inputs for the Label's fields.

public displayNode(node: Node): string source

Get HTML for displaying a form for editing Node fields.

Params:

NameTypeAttributeDescription
node Node

The Node object to display.

Return:

string

HTML string of a form with inputs for the Node's fields.

public update(obj: Node | Edge) source

Update the sidebar with the selected object.

Override:

SidebarContent#update

Params:

NameTypeAttributeDescription
obj Node | Edge

The selected Node or Edge.

public updateObjectValues(event: Event) source

Called when an 'input' or 'change' event is triggered by a form input. The field associated with that input is updated with the new value of the input.

Params:

NameTypeAttributeDescription
event Event

Event object from the listener.