main
Jan Umbach 2024-06-28 18:29:12 +02:00
parent 5083d794dc
commit e7be21e8cd
1 changed files with 12 additions and 12 deletions

View File

@ -432,8 +432,8 @@
function SHX_IFC_genSwatchSelect(inputID, labelText, inputName, inputVal, options, section_id) { function SHX_IFC_genSwatchSelect(inputID, labelText, inputName, inputVal, options, section_id) {
console.log("inputVal", inputVal); //console.log("inputVal", inputVal);
console.log("options", options); //console.log("options", options);
let html = ` let html = `
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}: <span class="shx-ifc-form_label_selected shx-ifc-form_label_selected_${inputID}">${options[inputVal].name}</span></label> <label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}: <span class="shx-ifc-form_label_selected shx-ifc-form_label_selected_${inputID}">${options[inputVal].name}</span></label>
@ -451,7 +451,7 @@
let swatchObj = options[swatch]; let swatchObj = options[swatch];
console.log("swatch",swatch); //console.log("swatch",swatch);
html += ` html += `
<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' : ''}> <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' : ''}>
@ -583,9 +583,9 @@
iFrameListener(event) { iFrameListener(event) {
//console.log("event.origin||", "'"+event.origin+"'", event.origin !== "https://3d-viewer.shinnex.de") ////console.log("event.origin||", "'"+event.origin+"'", event.origin !== "https://3d-viewer.shinnex.de")
if(event.origin !== {% if shx_get_environment contains "development" %}"https://3dview.wasgehtsiedasan.shinnex.de"{% else %}"https://3d-viewer.shinnex.de"{% endif %}) return; if(event.origin !== {% if shx_get_environment contains "development" %}"https://3dview.wasgehtsiedasan.shinnex.de"{% else %}"https://3d-viewer.shinnex.de"{% endif %}) return;
console.log("event.data||",event.data) //console.log("event.data||",event.data)
if(event.data === undefined) return; if(event.data === undefined) return;
@ -597,11 +597,11 @@
} }
let uuid =this.uuid; let uuid =this.uuid;
console.log("uuid", uuid); //console.log("uuid", uuid);
if(data.id !== this.uuid) { if(data.id !== this.uuid) {
if(data.status === "init" ) { if(data.status === "init" ) {
const initData = JSON.stringify({"init":{"uuid":uuid}}); const initData = JSON.stringify({"init":{"uuid":uuid}});
console.log("initData", initData ); //console.log("initData", initData );
this.Viewer3D.contentWindow.postMessage(initData, "*"); this.Viewer3D.contentWindow.postMessage(initData, "*");
this.showLoadingSpinner(); this.showLoadingSpinner();
@ -620,7 +620,7 @@
return; return;
} }
console.log("Message received from the child: ", data); // Message received from child //console.log("Message received from the child: ", data); // Message received from child
if(data.loaded === true) { if(data.loaded === true) {
this.hideLoadingSpinner(); this.hideLoadingSpinner();
@ -740,7 +740,7 @@
let filamentID = _name.slice(_name.indexOf('-') + 1); let filamentID = _name.slice(_name.indexOf('-') + 1);
console.log('filamentID', filamentID); //console.log('filamentID', filamentID);
let filament = SHX_getFilamentById(filamentID); let filament = SHX_getFilamentById(filamentID);
@ -755,7 +755,7 @@
console.log("swatch selected", key, swatchID, swatchValue ); //console.log("swatch selected", key, swatchID, swatchValue );
} }
} }
} }
@ -782,7 +782,7 @@
// check if some values are empty "" // check if some values are empty ""
for(let key in globalInputFormsObjValues[this.currentVariant]) { for(let key in globalInputFormsObjValues[this.currentVariant]) {
if(globalInputFormsObjValues[this.currentVariant][key].replaceAll(" ", "") === "") { if(globalInputFormsObjValues[this.currentVariant][key].replaceAll(" ", "") === "") {
console.log("Empty value found", key); //console.log("Empty value found", key);
this.disableBuyButton(); this.disableBuyButton();
return; return;
} }
@ -843,7 +843,7 @@
} }
} }
console.log('reloadCurrentVariant', id, openAnimation); //console.log('reloadCurrentVariant', id, openAnimation);
if(openAnimation) { if(openAnimation) {