Merge branch 'main' of https://github.com/JannexNet/SHX-Theme
commit
c52a59def4
|
@ -192,7 +192,7 @@
|
|||
return `
|
||||
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
|
||||
<div class="field custom">
|
||||
<input class="field__input" form="product-form-${section_id}" type="text" id="${inputID}" name="properties[${inputName}]" value="${inputVal}" onchange="document.querySelector('shx-input-forms').renderView()">
|
||||
<input class="field__input" form="product-form-${section_id}" type="text" id="${inputID}" name="properties[${inputName}]" value="${inputVal}" oninput="document.querySelector('shx-input-forms').renderView()">
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
@ -403,6 +403,15 @@
|
|||
}
|
||||
|
||||
renderView() {
|
||||
let currentTimeout = this.renderViewDebounce;
|
||||
if(currentTimeout) {
|
||||
clearTimeout(currentTimeout);
|
||||
}
|
||||
|
||||
this.renderViewDebounce = setTimeout(this._renderView.bind(this), 500);
|
||||
}
|
||||
|
||||
_renderView() {
|
||||
// request data from server
|
||||
let tJS = this.tJS;
|
||||
|
||||
|
@ -451,19 +460,7 @@
|
|||
if(this.Viewer3D)
|
||||
this.Viewer3D.contentWindow.postMessage(JSON.stringify({"changeView":{"currentVariant": this.currentVariant, values: globalInputFormsObjValues[this.currentVariant]}}), "*");
|
||||
|
||||
this.loadingSpinner.show();
|
||||
|
||||
|
||||
|
||||
/*fetch('https://render.shinnex.de/render/' + this.currentVariant, { method: 'POST', body: JSON.stringify(globalInputFormsObjValues[this.currentVariant]) })
|
||||
.then((response) => {
|
||||
// stl file
|
||||
return response.blob();
|
||||
}).then((blob) => {
|
||||
// log size in kB
|
||||
console.log(blob.size / 1024 + 'kB');
|
||||
|
||||
});*/
|
||||
this.loadingSpinner.show();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue