shx-3d-render

main
Jan Umbach 2024-06-23 12:54:07 +02:00
parent 0fe0e69782
commit c124185970
1 changed files with 4 additions and 4 deletions

View File

@ -396,7 +396,7 @@
let color = options[i];
html += `
<input type="radio" id="${inputID}-${color}" form="product-form-${section_id}" name="properties[${inputName}]" value="${FilamentList[color].name} #${color}" ${inputVal === color ? 'checked' : ''}>
<input type="radio" id="${inputID}-${color}" class="shx-ifc-colorselect-input" form="product-form-${section_id}" name="properties[${inputName}]" value="${FilamentList[color].name} #${color}" ${inputVal === color ? 'checked' : ''}>
<label for="${inputID}-${color}" style="background-color: ${FilamentList[color].hex};">
`;
@ -443,7 +443,7 @@
console.log("swatch",swatch);
html += `
<input type="radio" id="${inputID}-${swatch}" form="product-form-${section_id}" name="properties[${inputName}]" value="${swatchObj.name}" ${inputVal === swatch ? 'checked' : ''}>
<input type="radio" id="${inputID}-${swatch}" class="shx-ifc-swatchselect-input" form="product-form-${section_id}" name="properties[${inputName}]" value="${swatchObj.name}" ${inputVal === swatch ? 'checked' : ''}>
<label for="${inputID}-${swatch}" style="background-color: #f55;">
`;
@ -687,7 +687,7 @@
if(input.type === 'radio') {
if(input.checked) {
if(input.classList.contains('shx-ifc-colorselect')) {
if(input.classList.contains('shx-ifc-colorselect-input')) {
let _name = input.id.replace('shx-', '');
let name = _name.slice(0, _name.indexOf('-'));
@ -698,7 +698,7 @@
let filament = SHX_getFilamentById(filamentID);
globalInputFormsObjValues[key][name] = JSON.stringify(filament);
} else if(input.classList.contains('shx-ifc-watchselect')) {
} else if(input.classList.contains('shx-ifc-swatchselect-input')) {
let name = input.id.replace('shx-', '');
globalInputFormsObjValues[key][name] = input.value;