mirror of
https://github.com/placeAtlas/atlas.git
synced 2025-01-01 01:15:03 +01:00
Add set of drawable periods
(so whiteouts can't be selected oh man)
This commit is contained in:
parent
8c74460bf2
commit
16691ff691
2 changed files with 10 additions and 4 deletions
|
@ -783,8 +783,10 @@ function initPeriodGroups() {
|
|||
periodCopyEl.id = "periodCopy" + index
|
||||
periodStatusEl.id = "periodStatus" + index
|
||||
|
||||
startPeriodEl.max = variationsConfig[variation].versions.length - 1
|
||||
endPeriodEl.max = variationsConfig[variation].versions.length - 1
|
||||
startPeriodEl.min = variationsConfig[variation].drawablePeriods[0]
|
||||
endPeriodEl.min = variationsConfig[variation].drawablePeriods[0]
|
||||
startPeriodEl.max = variationsConfig[variation].drawablePeriods[1]
|
||||
endPeriodEl.max = variationsConfig[variation].drawablePeriods[1]
|
||||
startPeriodEl.value = start
|
||||
endPeriodEl.value = end
|
||||
if (startPeriodEl.max == 0) periodGroupEl.classList.add('no-time-slider')
|
||||
|
@ -810,9 +812,11 @@ function initPeriodGroups() {
|
|||
periodVariationEl.addEventListener('input', event => {
|
||||
const newVariation = event.target.value
|
||||
const newVariationConfig = variationsConfig[newVariation]
|
||||
startPeriodEl.max = newVariationConfig.versions.length - 1
|
||||
startPeriodEl.min = newVariationConfig.drawablePeriods[0]
|
||||
endPeriodEl.min = newVariationConfig.drawablePeriods[0]
|
||||
startPeriodEl.max = newVariationConfig.drawablePeriods[1]
|
||||
endPeriodEl.max = newVariationConfig.drawablePeriods[1]
|
||||
startPeriodEl.value = newVariationConfig.default
|
||||
endPeriodEl.max = newVariationConfig.versions.length - 1
|
||||
endPeriodEl.value = newVariationConfig.default
|
||||
periodVariationEl.previousElementSibling.innerHTML = newVariationConfig.icon;
|
||||
if (startPeriodEl.max == 0) periodGroupEl.classList.add('no-time-slider')
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue