Fix sort warning

This commit is contained in:
Pieter Vander Vennet 2022-07-21 19:18:11 +02:00
parent 13e949a1cd
commit b0cd6f3a09
2 changed files with 45 additions and 47 deletions

View file

@ -4,9 +4,7 @@ import MapControlButton from "../MapControlButton";
import GeoLocationHandler from "../../Logic/Actors/GeoLocationHandler";
import Svg from "../../Svg";
import MapState from "../../Logic/State/MapState";
import {VariableUiElement} from "../Base/VariableUIElement";
import LevelSelector from "../Input/LevelSelector";
import {UIEventSource} from "../../Logic/UIEventSource";
import FeaturePipeline from "../../Logic/FeatureSource/FeaturePipeline";
import {Utils} from "../../Utils";
@ -50,6 +48,7 @@ export default class RightControls extends Combine {
const allElements = state.featurePipeline.GetAllFeaturesAndMetaWithin(bbox);
const allLevelsRaw: string[] = [].concat(...allElements.map(allElements => allElements.features.map(f => <string>f.properties["level"])))
const allLevels = [].concat(...allLevelsRaw.map(l => LevelSelector.LevelsParser(l)))
allLevels.sort((a,b) => a < b ? -1 : 1)
return Utils.Dedup(allLevels)
})
const levelSelect = new LevelSelector(levelsInView)