Class: Controller

Controller(detailView)

used to distribute all changes between different views

Constructor

new Controller(detailView)

Parameters:
Name Type Description
detailView reference to an initialized detailView instance that should be connected to the controller
Source:

Methods

addFilter(filter)

add a new filter
Parameters:
Name Type Description
filter filter to be added
Source:

buildEdgeDict(edges)

builds edgeDict dictionary with key: edge.source_node value:edgeList should be called as soon as all edges are loaded
Parameters:
Name Type Description
edges sigma edges
Source:

createHistogramElement(elementId, name, data, drawHist)

creates a histogram element with the structure
[Histogram Label]
[Histogram]
Parameters:
Name Type Default Description
elementId The DOM Element the created structure is appended to.
name The name of the histogram, equals a filter name (e.g. LONGITUDE, LATITUDE, ...)
data The data the histogram is based on
drawHist true false if the structure should not contain a histogram (for discrete attributes)
Source:

getEdgesForNodes(node_id) → {*}

retrieves all edges (outgoing/incoming dependend on current setup) for a supplied node
Parameters:
Name Type Description
node_id id of the node to be queried
Source:
Returns:
a list of edges without specific order, empty list if id is not known
Type
*

getEdgesPerBox() → {Object}

checks for each box which edges apply to all further filters checks are performed for all possible features of an edge all edges that do not met the required restrictions are added to the unmapped edges of the unmapped nodes
Source:
Returns:
mapped: array of array of edges, unmapped: array of all other egdes
Type
Object

getFilterColors() → {Array.<any>}

returns a list of the specified filter colors in the respective order
Source:
Returns:
Type
Array.<any>

getNodesPerBox() → {Object}

checks for each node to which filter it belongs to checks are performed multidimensional (against all possible features) every node is in max 1 single box all nodes that do not match any filter are returned with the unmapped key
Source:
Returns:
mapped: array of array of nodes, unmapped: array of all other nodes
Type
Object

loadEdgeNav()

loads the edge histograms in the navigation area histograms are only created for continuous attributes
Source:

loadNodeNav()

loads the node histograms in the navigation area histograms are only created for continuous attributes, which are latitude and longitude
Source:

moveFilter(filterIdx, isUpwards)

moves a filter higher or lower in order
Parameters:
Name Type Description
filterIdx current index of the filter
isUpwards if true, index is reduced (upwards in sight)
Source:
Returns:
the new index of the changed filter

prepareJsonData(key, data)

Extracts relevant data of a json-array with the same attributes in each array-element
Parameters:
Name Type Description
key The key of the data, that is extracted (e.g. LONGITUDE, LATITUDE, ...)
data The input data
Source:
Returns:
the extracted data

recalcBoxes()

checks filter assignments again and updates all related views
Source:

recalcSelectionBoxes()

updates all selection boxes of the detail view this is useful if the active dimension for detail view changes
Source:

removeFilter(idx)

removes a filter at a given index
Parameters:
Name Type Description
idx
Source:

updateFilter(idx, feature, boundaries, updateSelections)

updates existing filter at position for a given feature
Parameters:
Name Type Default Description
idx index of filter to be changed
feature feature-space to be changed
boundaries min-max of feature to be changed
updateSelections true if true, rectangles of detail view are updated
Source:

updateFilterColor(idx, color)

updates color of rectangle, nodes and edges
Parameters:
Name Type Description
idx index of filter to be changed
color new color for the respective filter
Source: