commit | bc30e687532c1a3978fd96019c4f7d8b5a3aaa6d | [log] [tgz] |
---|---|---|
author | Simon Hunt <simon@onlab.us> | Wed Feb 15 18:39:23 2017 -0800 |
committer | Simon Hunt <simon@onlab.us> | Thu Feb 16 15:46:59 2017 -0800 |
tree | e3f078f790d3471f7ea75b1d60dc634f03b98ca6 | |
parent | ac0a82d7ba4ce9b1ee5d8d7e44af6153439ae553 [diff] |
More plumbing of grid coordinates vs. geo coordinates. - Added background reference parameter to layout command - send correct location data to client for devices, hosts Change-Id: Ic00bda76f4e4bc8d3e23e07a08f3bc5367ec85a9
diff --git a/web/gui/src/main/webapp/app/view/topo/topoModel.js b/web/gui/src/main/webapp/app/view/topo/topoModel.js index 0b4fd2c..887635d 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoModel.js +++ b/web/gui/src/main/webapp/app/view/topo/topoModel.js
@@ -115,7 +115,7 @@ var loc = node.location, coord; - if (loc && loc.type === 'lnglat') { + if (loc && loc.type === 'geo') { coord = coordFromLngLat(loc); node.fixed = true; node.px = node.x = coord[0];
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 6dedcd9..694af14 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodePosition.js
@@ -93,7 +93,7 @@ var loc = el.get('location'), coord; - if (loc && loc.type === 'lnglat') { + if (loc && loc.type === 'geo') { if (loc.lat === 0 && loc.lng === 0) { return false; @@ -106,6 +106,9 @@ return true; } + + // TODO: handle case where loc.type === 'grid' + // implying loc.gridX and loc.gridY hold values } function coordFromLngLat(loc) {