Cosmetics (again)
This commit is contained in:
parent
2898306e73
commit
e418ae0fbb
|
@ -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}</>;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue