Cosmetics (again)

This commit is contained in:
Eric van der Vlist 2022-10-15 20:27:36 +02:00
parent 2898306e73
commit e418ae0fbb
1 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ const TiledLayerConductor: react.FC<TiledLayerConductorProperties> = (
: props.numberOfZoomLevels;
const layers = [];
const ActiveZoomLevel = Math.min(
const activeZoomLevel = Math.min(
Math.max(Math.round(Math.log2(props.zoom)), 0),
numberOfZoomLevels - 1
);
@ -56,15 +56,15 @@ const TiledLayerConductor: react.FC<TiledLayerConductorProperties> = (
};
// First (ie last) dispay layers with less details (ascending order)
for (let i = 0; i < ActiveZoomLevel; i++) {
for (let i = 0; i < activeZoomLevel; i++) {
layers.push(getTiledLayer(i, false));
}
// then dispay layers with more details (descending order)
for (let i = numberOfZoomLevels - 1; i > ActiveZoomLevel; i--) {
for (let i = numberOfZoomLevels - 1; i > activeZoomLevel; i--) {
layers.push(getTiledLayer(i, false));
}
// And then, of course, the active one
layers.push(getTiledLayer(ActiveZoomLevel, true));
layers.push(getTiledLayer(activeZoomLevel, true));
return <>{layers}</>;
};