Topo2 - ONOS-6275 Updated the host node style to match classic topology
Change-Id: Ia374ff8dd6ad1f6e759da5d3543a69436664c59e
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Host.js b/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
index 7ba58ba..e54f5a0 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
@@ -24,9 +24,9 @@
var Collection, Model;
- var hostIconDim = 20,
- hostIconDimMin = 15,
- hostIconDimMax = 20,
+ var hostIconDim = 15,
+ hostIconDimMin = 8,
+ hostIconDimMax = 15,
remappedDeviceTypes = {};
function createHostCollection(data, region) {
@@ -98,7 +98,6 @@
onEnter: function (el) {
var node = d3.select(el),
icon = this.icon(),
- iconDim = hostIconDim,
textDy = 5,
textDx = (hostIconDim * 2) + 20;
@@ -108,12 +107,14 @@
.attr('class', 'svgIcon hostIcon');
g.append('circle').attr('r', hostIconDim);
+
+ var glyphSize = hostIconDim * 1.5;
g.append('use').attr({
'xlink:href': '#' + icon,
- width: iconDim,
- height: iconDim,
- x: -iconDim / 2,
- y: -iconDim / 2
+ width: glyphSize,
+ height: glyphSize,
+ x: -glyphSize / 2,
+ y: -glyphSize / 2
});
var labelText = this.label();