Bri Prebilic Cole

GUI -- Topo Toolbar is destroyed after view is rerouted.

Change-Id: I10085d3b8b77756fac988633dc8b930e433f81fd
......@@ -287,6 +287,7 @@
tps.destroyPanels();
tis.destroyInst();
tfs.destroyForce();
ttbs.destroyToolbar();
});
// svg layer and initialization of components
......
......@@ -27,6 +27,9 @@
// internal state
var toolbar, keyData;
// constants
var name = 'topo-tbar';
// key to button mapping data
var k2b = {
O: { id: 'summary-tog', gid: 'summary', isel: true},
......@@ -71,11 +74,15 @@
function createToolbar() {
initKeyData();
toolbar = tbs.createToolbar('topo-tbar');
toolbar = tbs.createToolbar(name);
addFirstRow();
toolbar.show();
}
function destroyToolbar() {
tbs.destroyToolbar(name);
}
// allows us to ensure the button states track key strokes
function keyListener(key) {
var v = keyData.get(key);
......@@ -99,6 +106,7 @@
return {
init: init,
createToolbar: createToolbar,
destroyToolbar: destroyToolbar,
keyListener: keyListener
};
}]);
......