3d-viewer test
parent
cae7666424
commit
99a653b857
|
@ -99,12 +99,14 @@
|
|||
}
|
||||
|
||||
connectedCallback() {
|
||||
this.innerHTML = '<div class="shx-input-forms-container"></div>';
|
||||
this.innerHTML = '<div class="shx-input-forms-container"><div class="shx-input-forms-content"></div></div>';
|
||||
this.container = this.querySelector('.shx-input-forms-container');
|
||||
this.content = this.container.querySelector('.shx-input-forms-content');
|
||||
|
||||
this.Viewer3D = document.createElement('iframe');
|
||||
this.Viewer3D.src = "https://3d-viewer.shinnex.de/";
|
||||
this.Viewer3D.classList.add('shx-threejs-renderer');
|
||||
this.container.appendChild(this.Viewer3D);
|
||||
}
|
||||
|
||||
initCurrentVariant(id) {
|
||||
|
@ -136,25 +138,24 @@
|
|||
|
||||
reloadCurrentVariant(id, openAnimation = false) {
|
||||
this.currentVariant = id;
|
||||
let content = this.content;
|
||||
let container = this.container;
|
||||
|
||||
// edit inner html
|
||||
container.innerHTML = "";
|
||||
content.innerHTML = "";
|
||||
|
||||
for(let key in globalInputFormsObj) {
|
||||
if(key === this.currentVariant) {
|
||||
container.innerHTML = globalInputFormsObj[key].renderHTML();
|
||||
content.innerHTML = globalInputFormsObj[key].renderHTML();
|
||||
}
|
||||
}
|
||||
|
||||
this.appendChild(this.Viewer3D);
|
||||
}
|
||||
|
||||
console.log('reloadCurrentVariant', id, openAnimation);
|
||||
|
||||
|
||||
if(openAnimation) {
|
||||
// calculate of this height
|
||||
let height = container.offsetHeight;
|
||||
let height = this.container.offsetHeight;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue