commit | b43c1a91d2fce9736a83ac9b8c6653a87b0e27cd | [log] [tgz] |
---|---|---|
author | Steven Burrows <sburrows@villa-technologies.com> | Tue Mar 07 17:13:28 2017 +0000 |
committer | Simon Hunt <simon@onlab.us> | Wed Mar 08 18:56:26 2017 +0000 |
tree | 10ac0ba81f317ece20a247aa401868b60eba1750 | |
parent | e80ec2cba8aef59eb67d79786bbc441eed4ee3ba [diff] [blame] |
Topo2: Refactored Maps and Sprites to be managed by a BackgroundService Change-Id: I75965fc76734436ce0c68e06dd75663baa924287
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js b/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js index ad8dfa9..6c19fe9 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2ViewController.js
@@ -39,6 +39,13 @@ visible: this.name + '_visible' } }, + appendElement: function (parent, node) { + var el = d3.select('#' + this.id); + if (el.empty()) { + return d3.select(parent).append(node).attr('id', this.id); + } + return el; + }, node: function() { return d3.select('#' + this.id); },