Current Node Types
CurrentNodeTypes is a module for the Graph-Browser that displays all node types that are currently shown in the Graph-Browser as buttons in a given html container. Each button has the backgroundcolor of the nodetype it represents and will highlight all nodes of the type, when it’s hovered and hide/unhide them when it’s clicked.
Fields |
Type |
Description |
container |
string |
The id of the container in wich the nodeTypeButtons can be put |
classes |
string |
Optional css classes for the nodeTypeButton-elements |
var graphSettings = {
graphContainer: 'graph-container',
moduleSettings: {'currentNodeTypes': {'container': 'graph-container', 'classes': 'btn btn-block'} }
};
var graphBrowser = new GraphBrowser(graphSettings);
Name |
Parameters |
Description |
getCurrentNodeTypes() |
Returns the node types that are currently present in the Graph-Browser |
getCurrentRelTypes() |
Returns the relationship types that are currently present in the Graph-Browser |
highlightNodeType(nodeType) |
{string} nodeType the node type that should be highlighted |
Highlights all nodes of the given node type |
unhighlightNodeType(nodeType) |
{string} nodeType the node type that shouldn’t be highlighted anymore |
Unhighlights all nodes of the given node type |
highlightRelType(relType) |
{string} relType the relationship type that should be highlighted |
Highlights all edges of the given relationship type |
unhighlightRelType(relType) |
{string} relType the relationship type that shouldn’t be highlighted anymore |
Unhighlights all edges of the given relationship type |
Tag |
HTML IDs |
Classes |
Purpose |
<div> |
currentNodeTypes-displayTypes |
currentNodeTypes-displayTypes |
Will be put in the settings’ container and filled with <a> -elements for each datatype shown in the graph |
<div> |
currentNodeTypes-nodeType-Btn{NodeType} |
currentNodeTypesButton |
One <a> -element for each type in the graphview. can be hovered for node highlighting, or clicked to hide/unhide the nodes of one type. The coler-style property of each button will be set to the color of the node Type. |