mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-25 19:44:23 +01:00
Use const
This commit is contained in:
parent
02a6ad3499
commit
8764f8e985
2 changed files with 4 additions and 4 deletions
|
@ -487,7 +487,7 @@ function initDraw() {
|
|||
}
|
||||
|
||||
function calculateCenter(path) {
|
||||
let result = polylabel(path)
|
||||
const result = polylabel(path)
|
||||
return [Math.floor(result[0]) + 0.5, Math.floor(result[1]) + 0.5]
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ async function updateTime(newPeriod = currentPeriod, newVariation = currentVaria
|
|||
|
||||
atlas = []
|
||||
for (const atlasIndex in atlasAll) {
|
||||
let pathChosen, centerChosen, chosenIndex
|
||||
let chosenIndex
|
||||
|
||||
const validPeriods2 = Object.keys(atlasAll[atlasIndex].path)
|
||||
|
||||
|
@ -197,8 +197,8 @@ async function updateTime(newPeriod = currentPeriod, newVariation = currentVaria
|
|||
}
|
||||
|
||||
if (chosenIndex === undefined) continue
|
||||
pathChosen = Object.values(atlasAll[atlasIndex].path)[chosenIndex]
|
||||
centerChosen = Object.values(atlasAll[atlasIndex].center)[chosenIndex]
|
||||
const pathChosen = Object.values(atlasAll[atlasIndex].path)[chosenIndex]
|
||||
const centerChosen = Object.values(atlasAll[atlasIndex].center)[chosenIndex]
|
||||
|
||||
if (pathChosen === undefined) continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue