shx-3d-render

main
Jan Umbach 2024-06-21 23:44:21 +02:00
parent 45e4053793
commit d2d8921231
1 changed files with 6 additions and 8 deletions

View File

@ -475,18 +475,16 @@
updateSelectSwatch(event) {
let target = event.target;
let input = target.previousElementSibling;
input.checked = true;
//let input = target.previousElementSibling;
//input.checked = true;
// .shx-ifc-form_label_selected_${input.id}
console.log("input.id", input.id, input , target);
// .shx-ifc-form_label_selected_${input.id}
// the the last - and get the id
let inputID = input.id.slice(0, input.id.lastIndexOf('-'));
let filamentID = input.id.slice(inputID.indexOf('-') + 1);
let inputID = target.id.slice(0, target.id.lastIndexOf('-'));
let filamentID = target.id.slice(inputID.indexOf('-') + 1);
console.log("input.id", input.id, "inputID", inputID, "filamentID", filamentID);
console.log("input.id", target.id, "inputID", inputID, "filamentID", filamentID);
let filament = SHX_getFilamentById(filamentID);
document.querySelector('.shx-ifc-form_label_selected_' + inputID).innerHTML = filament.name;