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 @@
cb && cb(selectOrder);
}
function mouseOverHook(what) {
var cb = _hook('mouseover');
cb && cb(what);
}
function mouseOutHook() {
var cb = _hook('mouseout');
cb && cb();
}
// === -----------------------------------------------------
// Event (from server) Handlers
......@@ -362,7 +372,9 @@
escape: escapeHook,
emptySelect: emptySelectHook,
singleSelect: singleSelectHook,
multiSelect: multiSelectHook
multiSelect: multiSelectHook,
mouseOver: mouseOverHook,
mouseOut: mouseOutHook
},
showHighlights: showHighlights
......
......@@ -61,10 +61,13 @@
function nodeMouseOver(m) {
if (!m.dragStarted) {
//$log.debug("MouseOver()...", m);
if (hovered != m) {
hovered = m;
tts.requestTrafficForMode();
tov.hooks.mouseOver({
id: m.id,
class: m.class,
type: m.type
});
}
}
}
......@@ -73,9 +76,8 @@
if (!m.dragStarted) {
if (hovered) {
hovered = null;
tts.requestTrafficForMode();
tov.hooks.mouseOut();
}
//$log.debug("MouseOut()...", m);
}
}
......
......@@ -132,6 +132,15 @@
multi: function (selectOrder) {
tts.requestTrafficForMode();
tov.addDetailButton('showRelatedTraffic');
},
// mouse hooks
mouseover: function (m) {
// m has id, class, and type properties
tts.requestTrafficForMode();
},
mouseout: function () {
tts.requestTrafficForMode();
}
}
};
......