Doubleclick on a table entry to follow that aircraft.
This commit is contained in:
parent
eb023ff1d9
commit
3040609816
|
@ -78,7 +78,8 @@ function processReceiverUpdate(data) {
|
||||||
plane.tr.cells[0].textContent = hex;
|
plane.tr.cells[0].textContent = hex;
|
||||||
}
|
}
|
||||||
|
|
||||||
plane.tr.addEventListener('click', selectPlaneByHex.bind(undefined,hex));
|
plane.tr.addEventListener('click', selectPlaneByHex.bind(undefined,hex,false));
|
||||||
|
plane.tr.addEventListener('dblclick', selectPlaneByHex.bind(undefined,hex,true));
|
||||||
|
|
||||||
Planes[hex] = plane;
|
Planes[hex] = plane;
|
||||||
PlanesOrdered.push(plane);
|
PlanesOrdered.push(plane);
|
||||||
|
@ -819,7 +820,7 @@ function sortBy(id,sc,se) {
|
||||||
resortTable();
|
resortTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectPlaneByHex(hex) {
|
function selectPlaneByHex(hex,autofollow) {
|
||||||
//console.log("select: " + hex);
|
//console.log("select: " + hex);
|
||||||
// If SelectedPlane has something in it, clear out the selected
|
// If SelectedPlane has something in it, clear out the selected
|
||||||
if (SelectedPlane != null) {
|
if (SelectedPlane != null) {
|
||||||
|
@ -845,7 +846,7 @@ function selectPlaneByHex(hex) {
|
||||||
SelectedPlane = null;
|
SelectedPlane = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
FollowSelected = false;
|
FollowSelected = (autofollow ? true : false);
|
||||||
refreshSelected();
|
refreshSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue