shx-3d-render

main
Jan Umbach 2024-06-13 16:24:20 +02:00
parent a39b396f10
commit abc29a8bf9
1 changed files with 12 additions and 4 deletions

View File

@ -75,24 +75,32 @@
reloadCurrentVariant(id, openAnimation = false) {
this.currentVariant = id;
let container = this.container;
// edit inner html
this.container.innerHTML = "";
container.innerHTML = "";
for(let key in globalInputFormsObj) {
if(key === this.currentVariant) {
this.innerHTML = globalInputFormsObj[key].renderHTML();
container.innerHTML = globalInputFormsObj[key].renderHTML();
}
}
if(!container) {
console.error('container not found');
return;
}
console.log('reloadCurrentVariant', id, openAnimation);
if(openAnimation) {
// calculate of this height
let height = this.container.offsetHeight;
let height = container.offsetHeight;
let container = this.container;
container.style.height = '0px';