Fix ledmap code

Index.js: fix ledmap bug
json.cpp: remove old ledmap checks
presets.cpp: remove loadledmap call
This commit is contained in:
Ewoud
2022-11-19 14:15:29 +01:00
parent 8b25dc275e
commit 7946c745d4
6 changed files with 59 additions and 69 deletions

View File

@@ -1854,7 +1854,7 @@ ${makePlSel(plJson[i].end?plJson[i].end:0, true)}
<input type="checkbox" id="p${i}sbchk">
<span class="checkmark"></span>
</label>`;
if (Array.isArray(lastinfo.maps) && lastinfo.maps.length>1) {
if (Array.isArray(lastinfo.maps) && lastinfo.maps.length>0) {
content += `<div class="lbl-l">Ledmap:&nbsp;<div class="sel-p"><select class="sel-p" id="p${i}lmp"><option value="">Unchanged</option>`;
for (const k of (lastinfo.maps||[])) content += `<option value="${k}"${(i>0 && pJson[i].ledmap==k)?" selected":""}>${k==0?'Default':'ledmap'+k+'.json'}</option>`;
content += "</select></div></div>";