From 0e6aff343ff43e63e6fc769842ec0a53e7c9e29d Mon Sep 17 00:00:00 2001 From: Jan Umbach Date: Wed, 19 Jun 2024 20:42:22 +0200 Subject: [PATCH] shx-3d-render --- snippets/shx-3d-render-input.liquid | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snippets/shx-3d-render-input.liquid b/snippets/shx-3d-render-input.liquid index 76f9213..da51cb6 100644 --- a/snippets/shx-3d-render-input.liquid +++ b/snippets/shx-3d-render-input.liquid @@ -223,6 +223,8 @@ // Clean up the element when it is removed from the DOM. } + + renderView() { // request data from server let tJS = this.tJS; @@ -250,8 +252,8 @@ } } - - this.Viewer3D.contentWindow.postMessage(JSON.stringify({"changeView":{"currentVariant": this.currentVariant, values: globalInputFormsObjValues[this.currentVariant]}}), "*"); + 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');