Simon Hunt
Committed by Gerrit Code Review

ONOS-2186 - GUI Topo Overlay - (WIP)

- re-routed mouseover/mouseout through the topology overlay.

Change-Id: Ia20469415458f7f301a7650bfcaa9e758828b8d5
...@@ -275,6 +275,16 @@ ...@@ -275,6 +275,16 @@
275 cb && cb(selectOrder); 275 cb && cb(selectOrder);
276 } 276 }
277 277
278 + function mouseOverHook(what) {
279 + var cb = _hook('mouseover');
280 + cb && cb(what);
281 + }
282 +
283 + function mouseOutHook() {
284 + var cb = _hook('mouseout');
285 + cb && cb();
286 + }
287 +
278 // === ----------------------------------------------------- 288 // === -----------------------------------------------------
279 // Event (from server) Handlers 289 // Event (from server) Handlers
280 290
...@@ -362,7 +372,9 @@ ...@@ -362,7 +372,9 @@
362 escape: escapeHook, 372 escape: escapeHook,
363 emptySelect: emptySelectHook, 373 emptySelect: emptySelectHook,
364 singleSelect: singleSelectHook, 374 singleSelect: singleSelectHook,
365 - multiSelect: multiSelectHook 375 + multiSelect: multiSelectHook,
376 + mouseOver: mouseOverHook,
377 + mouseOut: mouseOutHook
366 }, 378 },
367 379
368 showHighlights: showHighlights 380 showHighlights: showHighlights
......
...@@ -61,10 +61,13 @@ ...@@ -61,10 +61,13 @@
61 61
62 function nodeMouseOver(m) { 62 function nodeMouseOver(m) {
63 if (!m.dragStarted) { 63 if (!m.dragStarted) {
64 - //$log.debug("MouseOver()...", m);
65 if (hovered != m) { 64 if (hovered != m) {
66 hovered = m; 65 hovered = m;
67 - tts.requestTrafficForMode(); 66 + tov.hooks.mouseOver({
67 + id: m.id,
68 + class: m.class,
69 + type: m.type
70 + });
68 } 71 }
69 } 72 }
70 } 73 }
...@@ -73,9 +76,8 @@ ...@@ -73,9 +76,8 @@
73 if (!m.dragStarted) { 76 if (!m.dragStarted) {
74 if (hovered) { 77 if (hovered) {
75 hovered = null; 78 hovered = null;
76 - tts.requestTrafficForMode(); 79 + tov.hooks.mouseOut();
77 } 80 }
78 - //$log.debug("MouseOut()...", m);
79 } 81 }
80 } 82 }
81 83
......
...@@ -132,6 +132,15 @@ ...@@ -132,6 +132,15 @@
132 multi: function (selectOrder) { 132 multi: function (selectOrder) {
133 tts.requestTrafficForMode(); 133 tts.requestTrafficForMode();
134 tov.addDetailButton('showRelatedTraffic'); 134 tov.addDetailButton('showRelatedTraffic');
135 + },
136 +
137 + // mouse hooks
138 + mouseover: function (m) {
139 + // m has id, class, and type properties
140 + tts.requestTrafficForMode();
141 + },
142 + mouseout: function () {
143 + tts.requestTrafficForMode();
135 } 144 }
136 } 145 }
137 }; 146 };
......