Difference between revisions of "Widget:RuneDisp"
From Official Runecraft Wiki
Line 25: | Line 25: | ||
const modelViewerLayers = document.querySelector("model-viewer#MLrune"); | const modelViewerLayers = document.querySelector("model-viewer#MLrune"); | ||
const select = document.querySelector('#layer'); | const select = document.querySelector('#layer'); | ||
− | |||
− | |||
modelViewerLayers.addEventListener('load', () => { | modelViewerLayers.addEventListener('load', () => { | ||
Line 42: | Line 40: | ||
option.textContent = 'Full Rune'; | option.textContent = 'Full Rune'; | ||
select.appendChild(option); | select.appendChild(option); | ||
+ | |||
+ | |||
+ | var layer = runefiles.length; | ||
var reversedRunes = runefiles.reverse(); | var reversedRunes = runefiles.reverse(); | ||
Line 49: | Line 50: | ||
const option = document.createElement('option'); | const option = document.createElement('option'); | ||
option.value = rne; | option.value = rne; | ||
− | if ( | + | if (layer == activationlayer) { |
option.textContent = 'Activation Layer'; | option.textContent = 'Activation Layer'; | ||
} else { | } else { | ||
− | option.textContent = 'Layer '+ | + | option.textContent = 'Layer '+ layer); |
} | } | ||
select.appendChild(option); | select.appendChild(option); | ||
+ | layer--; | ||
} | } | ||
Revision as of 18:23, 14 January 2022