src/provider/provider.js
function (node, element) {
            var labelAsCSSName = node.label.replace(/[^0-9a-z\-_]/gi, '');

            var cssClass = "ppt-node__" + element;

            if (node.type === graph.node.NodeTypes.ROOT) {
                cssClass = cssClass + "--root";
            }
            if (node.type === graph.node.NodeTypes.CHOOSE) {
                cssClass = cssClass + "--choose";
            }
            if (node.type === graph.node.NodeTypes.GROUP) {
                cssClass = cssClass + "--group";
            }
            if (node.type === graph.node.NodeTypes.VALUE) {
                cssClass = cssClass + "--value";
            }
            if (node.value !== undefined && node.value.length > 0) {
                cssClass = cssClass + "--value-selected";
            }
            if (node.count === 0) {
                cssClass = cssClass + "--disabled";
            }

            return cssClass + " " + labelAsCSSName;
        }
function (node, element) {
            var labelAsCSSName = node.label.replace(/[^0-9a-z\-_]/gi, '');

            var cssClass = "ppt-node__" + element;

            if (node.type === graph.node.NodeTypes.ROOT) {
                cssClass = cssClass + "--root";
            }
            if (node.type === graph.node.NodeTypes.CHOOSE) {
                cssClass = cssClass + "--choose";
            }
            if (node.type === graph.node.NodeTypes.GROUP) {
                cssClass = cssClass + "--group";
            }
            if (node.type === graph.node.NodeTypes.VALUE) {
                cssClass = cssClass + "--value";
            }
            if (node.value !== undefined && node.value.length > 0) {
                cssClass = cssClass + "--value-selected";
            }
            if (node.count === 0) {
                cssClass = cssClass + "--disabled";
            }

            return cssClass + " " + labelAsCSSName;
        }
function ( node , element ) { var labelAsCSSName = node . label . replace ( / [^0-9a-z\-_] / gi , '' ) ; var cssClass = "ppt-node__" + element ; if ( node . type === graph . node . NodeTypes . ROOT ) { cssClass = cssClass + "--root" ; } if ( node . type === graph . node . NodeTypes . CHOOSE ) { cssClass = cssClass + "--choose" ; } if ( node . type === graph . node . NodeTypes . GROUP ) { cssClass = cssClass + "--group" ; } if ( node . type === graph . node . NodeTypes . VALUE ) { cssClass = cssClass + "--value" ; } if ( node . value !== undefined && node . value . length > 0 ) { cssClass = cssClass + "--value-selected" ; } if ( node . count === 0 ) { cssClass = cssClass + "--disabled" ; } return cssClass + " " + labelAsCSSName ; }
Generate a CSS class for the node depending on its type.

@param node
@param element
@return {string}
Generate a CSS class for the node depending on its type .