mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-29 09:04:37 +01:00
Swap if start > end 4
This commit is contained in:
parent
08f195eb12
commit
5129fbc1ff
1 changed files with 1 additions and 0 deletions
|
@ -254,6 +254,7 @@ tooltip.parentElement.addEventListener('mouseenter', () => updateTooltip(parseIn
|
|||
window.addEventListener('resize', () => updateTooltip(parseInt(timelineSlider.value), currentVariation))
|
||||
|
||||
function isOnPeriod(start, end, variation, currentPeriod, currentVariation) {
|
||||
if (start > end) [start, end] = [end, start]
|
||||
return currentPeriod >= start && currentPeriod <= end && variation === currentVariation
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue