mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 18:32:28 +02:00
ONOS-5403: cleaned up code change to match coding style.
Change-Id: If1ba37d8f4b6d3296a057bbf2dfa042ed2051eab
This commit is contained in:
parent
0cf084b162
commit
f9761458ec
@ -117,23 +117,24 @@
|
||||
minDist = proximity * 2;
|
||||
|
||||
network.links.forEach(function (d) {
|
||||
var line = d.position,
|
||||
point,
|
||||
hit,
|
||||
dist;
|
||||
|
||||
if (!api.showHosts() && d.type() === 'hostLink') {
|
||||
return; // skip hidden host links
|
||||
}
|
||||
|
||||
if(d.position != null)
|
||||
{
|
||||
var line = d.position,
|
||||
point = pdrop(line, mouse),
|
||||
hit = lineHit(line, point, mouse),
|
||||
dist;
|
||||
}
|
||||
|
||||
if (hit) {
|
||||
dist = mdist(point, mouse);
|
||||
if (dist < minDist) {
|
||||
minDist = dist;
|
||||
nearest = d;
|
||||
if (line) {
|
||||
point = pdrop(line, mouse);
|
||||
hit = lineHit(line, point, mouse);
|
||||
if (hit) {
|
||||
dist = mdist(point, mouse);
|
||||
if (dist < minDist) {
|
||||
minDist = dist;
|
||||
nearest = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -225,17 +226,11 @@
|
||||
|
||||
tss.deselectAll();
|
||||
|
||||
if(ldata != null)
|
||||
{
|
||||
|
||||
if (!ldata.el.classed('selected')) {
|
||||
selLink(ldata);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ldata) {
|
||||
if (ldata.el.classed('selected')) {
|
||||
unselLink(ldata);
|
||||
return;
|
||||
} else {
|
||||
selLink(ldata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,18 +107,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (obj !=null)
|
||||
{
|
||||
if (obj.class === 'link') {
|
||||
if (selections[obj.key]) {
|
||||
deselectObject(obj.key);
|
||||
} else {
|
||||
selections[obj.key] = { obj: obj, el: el };
|
||||
selectOrder.push(obj.key);
|
||||
}
|
||||
updateDetail();
|
||||
return;
|
||||
if (obj && obj.class === 'link') {
|
||||
if (selections[obj.key]) {
|
||||
deselectObject(obj.key);
|
||||
} else {
|
||||
selections[obj.key] = { obj: obj, el: el };
|
||||
selectOrder.push(obj.key);
|
||||
}
|
||||
updateDetail();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!n) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user