- Trying to figure out how to set icons in a topology.
- https://developer.cisco.com/media/neXt-site/example.html#Basic/icons here is an example, but where exactly would you need to reuse this code. Is it inside the Shell.js or some additional file Looking for a full icon example in terms of .html and .js files, that would be a huge help.
Check this demo on jsfiddle about how to set icon to node.
http://jsfiddle.net/nextsupport/7zvmbwqx/
This is main part, you can return icon name at this function. (And you can find icon’s name at here https://developer.cisco.com/media/neXt-site/example.html#Basic/icons)
iconType:function(vertex) { var id = vertex.get("id"); if (id > 2) { return 'router' } else { return 'camera' } }
- Having troubles in setting this icon example up. The following are the steps performed.
index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../next/dest/css/next.css">
<script src="../next/dest/js/next.js"></script>
<script src="Data.js"></script>
</head>
<body>
</body>
</html>
- Data.js contains the nx data that is shown on the left side of your demo.
- When opening the html file in chrome the page remains empty.
You should use 'dom.ready' to attach topo instance.
Comments
0 comments
Please sign in to leave a comment.