From fe0b867571eecc29528c0e07e67dc813b6719be9 Mon Sep 17 00:00:00 2001 From: Ricky Johnson Date: Wed, 20 Mar 2024 13:29:05 -0400 Subject: [PATCH] made version number global --- javascripts/common/load_scripts.js | 4 +++- javascripts/conversionService.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/javascripts/common/load_scripts.js b/javascripts/common/load_scripts.js index 8a49f95..1cc493f 100644 --- a/javascripts/common/load_scripts.js +++ b/javascripts/common/load_scripts.js @@ -1,7 +1,9 @@ +var versionNumer async function loadDynamicScript() { var result = await fetchVersionNumber(); - var versionNumer = result['hcVersion'] + versionNumer = result['hcVersion'] var url = `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}/hoops_web_viewer.js` + // var url = `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}/hoops-web-viewer.iife.js` return new Promise((resolve, reject) => { $.getScript(url, async function () { diff --git a/javascripts/conversionService.js b/javascripts/conversionService.js index 2d77a93..fab2725 100644 --- a/javascripts/conversionService.js +++ b/javascripts/conversionService.js @@ -19,7 +19,8 @@ async function startViewer(modelName, uid) { containerId: "viewerContainer", endpointUri: sessioninfo.endpointUri, model: modelName, - enginePath: "https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer", + enginePath: `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}`, + // enginePath: `https://cdn.jsdelivr.net/gh/techsoft3d/hoops-web-viewer@20${versionNumer}`, rendererType: 0 });