shx-3d-render
parent
c75bff104e
commit
3848936f4b
|
@ -170,7 +170,8 @@
|
|||
const initData = JSON.stringify({"init":{"uuid":uuid}});
|
||||
console.log("initData", initData );
|
||||
this.Viewer3D.contentWindow.postMessage(initData, "*");
|
||||
this.Viewer3DContainer.querySelector('.shx-loading-spinner-container').classList.remove('shx-loading-spinner-container-done');
|
||||
|
||||
this.loadingSpinner.show();
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
@ -178,9 +179,9 @@
|
|||
console.log("Message received from the child: ", data); // Message received from child
|
||||
|
||||
if(data.loaded === true) {
|
||||
this.Viewer3DContainer.querySelector('.shx-loading-spinner-container').classList.add('shx-loading-spinner-container-done');
|
||||
this.loadingSpinner.hide();
|
||||
} else {
|
||||
this.Viewer3DContainer.querySelector('.shx-loading-spinner-container').classList.remove('shx-loading-spinner-container-done');
|
||||
this.loadingSpinner.show();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -204,6 +205,7 @@
|
|||
this.Viewer3DContainer = document.createElement('div');
|
||||
this.Viewer3DContainer.classList.add('shx-threejs-renderer-container');
|
||||
this.Viewer3DContainer.innerHTML = `{% render 'shx-loading-spinner', content_type:"body" %}`;
|
||||
this.loadingSpinner = this.Viewer3DContainer.querySelector('shx-loading-spinner');
|
||||
this.container.appendChild(this.Viewer3DContainer);
|
||||
|
||||
|
||||
|
@ -269,7 +271,8 @@
|
|||
|
||||
if(this.Viewer3D)
|
||||
this.Viewer3D.contentWindow.postMessage(JSON.stringify({"changeView":{"currentVariant": this.currentVariant, values: globalInputFormsObjValues[this.currentVariant]}}), "*");
|
||||
this.Viewer3DContainer.querySelector('.shx-loading-spinner-container').classList.remove('shx-loading-spinner-container-done');
|
||||
|
||||
this.loadingSpinner.show();
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue