GUI2 Bug fixes to Topo view

Change-Id: Ib40279fec94ffecb1d6c771aa376ad1cded03c02
diff --git a/web/gui2-topo-lib/projects/gui2-topo-lib/src/lib/topology/topology.component.ts b/web/gui2-topo-lib/projects/gui2-topo-lib/src/lib/topology/topology.component.ts
index 601159d..8ce1a6e 100644
--- a/web/gui2-topo-lib/projects/gui2-topo-lib/src/lib/topology/topology.component.ts
+++ b/web/gui2-topo-lib/projects/gui2-topo-lib/src/lib/topology/topology.component.ts
@@ -69,6 +69,7 @@
 import {ZoomableDirective} from '../layer/zoomable.directive';
 import {MapObject} from '../layer/maputils';
 import {LayoutService, LayoutType} from '../layout.service';
+import {SelectedEvent} from '../layer/forcesvg/visuals/nodevisual';
 
 const TOPO2_PREFS = 'topo2_prefs';
 const TOPO_MAPID_PREFS = 'topo_mapid';
@@ -86,6 +87,11 @@
 const PREF_TOOLBAR = 'toolbar';
 const PREF_PINNED = 'pinned';
 
+const BACKGROUND_ELEMENTS = [
+    'svg topo2',
+    'path bgmap'
+];
+
 /**
  * Model of the topo2_prefs object - this is a subset of the overall Prefs returned
  * by the server
@@ -599,7 +605,7 @@
     }
 
     protected equalizeMasters() {
-        this.wss.sendEvent('equalizeMasters', null);
+        this.wss.sendEvent('equalizeMasters', {});
         this.flashMsg = this.lionFn('fl_eq_masters');
         this.log.debug('equalizing masters');
     }
@@ -700,6 +706,18 @@
         this.log.debug('Map zoom prefs updated', zoomMapExtents);
     }
 
+    backgroundClicked(event: MouseEvent) {
+        const elemTagName = event.target['tagName'] + ' ' + event.target['id'];
+        if (BACKGROUND_ELEMENTS.includes(elemTagName)) {
+            this.force.updateSelected(
+                <SelectedEvent>{
+                    uiElement: undefined,
+                    deselecting: true
+                }
+            );
+        }
+    }
+
     /**
      * Read the LION bundle for Toolbar and set up the lionFn
      */