commit | bd40284e481bb748ed46951bde1ceb05202e60ea | [log] [tgz] |
---|---|---|
author | Steven Burrows <sburrows@villa-technologies.com> | Wed Mar 08 21:30:38 2017 +0000 |
committer | Simon Hunt <simon@onlab.us> | Wed Mar 08 23:58:22 2017 +0000 |
tree | 6222fb504408d88f9217bbb3d861d3024a860db1 | |
parent | 9b9c72975841c46996fa636aecd9d23ed2a84352 [diff] [blame] |
Topo2: Bug fixes 1: port lables not showing on mouseover 2: D3 Errors when there are no topology errors and a user pans/zooms Change-Id: Ic65ba393d23b60673c3a731d1986ee15bbe1bd88
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js index e29c45b..f30401f 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
@@ -128,6 +128,12 @@ } function coordFromXY(loc) { + + // Something this is wrong in the config + if (!t2sls.getWidth() || !t2sls.getHeight()) { + return [0, 0]; + } + var scale = 1000 / t2sls.getWidth(), yOffset = (1000 - (t2sls.getHeight() * scale)) / 2;