You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

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.

Settings

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

Example

var graphSettings = {
    graphContainer: 'graph-container',
    moduleSettings: {'currentNodeTypes': {'container': 'graph-container', 'classes': 'btn btn-block'} }  
};
var graphBrowser = new GraphBrowser(graphSettings);

Functions

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

Created HTML fields

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.

Search results for "Current Node Types"

We could not find anything matching "Current Node Types" in our documentation. Please rephrase your search.

You can also ask your questions in the Structr Google Group or create a free account in the Structr Support Portal.
Click here to send feedback to the Structr team.