Disable delete button when only 1 period

Disable it or hide it?
This commit is contained in:
Hans5958 2022-04-30 11:52:11 +07:00
parent 736db1bc98
commit 251e6b7af8

View file

@ -792,6 +792,7 @@ function initPeriodGroups() {
endPeriodEl.value = end
if (startPeriodEl.max == 0) periodGroupEl.classList.add('no-time-slider')
else periodGroupEl.classList.remove('no-time-slider')
if (pathWithPeriods.length === 1) periodDeleteEl.classList.add("disabled")
startPeriodEl.addEventListener('input', event => {
timelineSlider.value = parseInt(event.target.value)