NeXt nodeset
HTML
<link rel="stylesheet" href="https://abdvl.github.io/src/dist/css/next.css">
<script src="https://abdvl.github.io/src/dist/js/next.js"></script>
CSS
body,
html {
height: 100%;
}
JavaScript
topo = new nx.graphic.Topology({
adaptive: true,
nodeConfig: {
label: 'model.id'
},
showIcon: true,
theme: 'yellow'
});
topo.on('ready', function() {
nx.each(topologyData.nodes, function (node) {
topo.addNode(node)
})
topo.addNodeSet(topologyData.nodeSet[0])
})
var app = new nx.ui.Application();
topo.attach(app);
var topologyData = {
nodes: [{
"id": 0,
"x": 410,
"y": 100,
"name": "12K-1"
}, {
"id": 1,
"x": 410,
"y": 280,
"name": "12K-2"
}],
nodeSet: [{
id: 5,
nodes: [0, 1],
root: 0,
"x": 300,
"y": 300,
"name": "Node set 1",
iconType: 'router'
}]
};