Current Node Types

Search
Feedback

CurrentNodeTypes is a module for the Graph-Browser that displays all nodetypes that are currently shown in the graphview 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.

Dependencies for this module:

  • jquery
  • sigma.min.js
  • sigma.renderers.halo.min.js
  • graph.browser.core.js
  • graph.browser.modulecontrol.js
  • graph.browser.module.currentnodetypes.js

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);

Created HTML fields

tag HTML IDs classes purpose
<div> currentNodeTypes-displayTypes currentNodeTypes-displayTypes Will be put in the settings’ container and filled with -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.

Graph-Browser

About this article
Last change 2016-08-29
Topics ExperimentalStructr 2.0