refactor: submap - UI update

This commit is contained in:
Azgaar 2024-10-20 02:29:10 +02:00
parent 431a5aa3e9
commit 6e38c93841
4 changed files with 22 additions and 48 deletions

View file

@ -45,11 +45,10 @@ window.Submap = (function () {
restoreRoutes(parentMap, projection);
restoreReligions(parentMap, projection);
restoreProvinces(parentMap);
restoreRiverDetails(parentMap, inverse);
restoreFeatureDetails(parentMap, inverse);
restoreMarkers(parentMap, projection);
restoreZones(parentMap, projection, options);
restoreFeatureDetails(parentMap, inverse);
Rivers.specify();
showStatistics();
}
@ -277,6 +276,15 @@ window.Submap = (function () {
});
}
// TODO: actually restore rivers
function restoreRiverDetails(parentMap, inverse) {
pack.rivers.forEach(river => {
river.basin = Rivers.getBasin(river.i);
river.name = Rivers.getName(river.mouth);
river.type = Rivers.getType(river);
});
}
function restoreFeatureDetails(parentMap, inverse) {
pack.features.forEach(feature => {
if (!feature) return;