fix default sorting
fixes: https://github.com/wiedehopf/tar1090/issues/199
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
- filterIcao=^a - filter icao that start with a
|
||||
- filterSources=adsb,uat,adsr,mlat,tisb,modeS - filter palnes by source type.
|
||||
- filterDbFlag=military,pia,ladd - filter planes by the db flags.
|
||||
- sortBy=column - (possible values: icao, flag, flight, registration, aircraft_type, squawk, altitude, speed, vert_rate, distance, track, msgs, seen, rssi, lat, lon, data_source, military, ws, wd
|
||||
- sortByReverse - reverse the sorting specified using sortBy
|
||||
|
||||
See the main readme for more exapmles on how to use the filters
|
||||
|
||||
@@ -57,6 +59,7 @@ See the main readme for more exapmles on how to use the filters
|
||||
- nowebgl - force rendering without WebGL.
|
||||
- tableInView - button V / only show aircraft in view in the table
|
||||
- screenshot - For automatic screenshotting, disables updates after the first load of all aircraft in view
|
||||
- SiteLat=45.0 SiteLon=10.0 - Override the receiver location for this visit
|
||||
|
||||
## Toggles
|
||||
|
||||
|
||||
@@ -6317,8 +6317,8 @@ function geoFindMe() {
|
||||
}
|
||||
}
|
||||
|
||||
let initSitePosFirstRun = true;
|
||||
function initSitePos() {
|
||||
let lastSitePosition = SitePosition;
|
||||
// Set SitePosition
|
||||
if (SiteLat != null && SiteLon != null) {
|
||||
SitePosition = [SiteLon, SiteLat];
|
||||
@@ -6329,8 +6329,15 @@ function initSitePos() {
|
||||
TAR.planeMan.setColumnVis('distance', false);
|
||||
}
|
||||
|
||||
if (!lastSitePosition) {
|
||||
if (SitePosition) {
|
||||
if (initSitePosFirstRun && SitePosition) {
|
||||
initSitePosFirstRun = false;
|
||||
const sortBy = usp.get('sortBy');
|
||||
if (sortBy) {
|
||||
TAR.planeMan.cols[sortBy].sort();
|
||||
if (usp.has('sortByReverse')) {
|
||||
TAR.planeMan.cols[sortBy].sort();
|
||||
}
|
||||
} else if (SitePosition) {
|
||||
TAR.planeMan.cols.distance.sort();
|
||||
} else {
|
||||
TAR.planeMan.cols.altitude.sort();
|
||||
|
||||
Reference in New Issue
Block a user