Mercurial > hg > orthanc-volview
view VolView/VolView-4.3.0.patch @ 20:496db8eaa8ef
updated VolView to 4.3.0
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 17 Jan 2025 11:19:46 +0100 |
parents | VolView/VolView-4.1.1.patch@59117a506f9f |
children |
line wrap: on
line source
diff -urEb VolView-4.3.0.orig/src/io/itk/itkConfig.js VolView-4.3.0/src/io/itk/itkConfig.js --- VolView-4.3.0.orig/src/io/itk/itkConfig.js 2025-01-16 18:46:08.962374027 +0100 +++ VolView-4.3.0/src/io/itk/itkConfig.js 2025-01-17 11:10:48.362129043 +0100 @@ -2,8 +2,15 @@ const base = import.meta.env.BASE_URL; -const fullUrl = (relative) => - new URL(join(base, relative), document.location.origin).href; +const fullUrl = (relative) => { // ex: /itk/image-io + const u = new URL(document.location); // ex: http://localhost:8043/orthanc/volview/index.html + const origin = u.origin; // ex: http://localhost:8043 + let pathParts = u.pathname.split('/'); // ex: ['', 'orthanc', 'volview', 'index.html'] + pathParts.pop(); // ex: ['', 'orthanc', 'volview'] + + const url = origin + pathParts.join('/') + relative; // ex http://localhost:8043/orthanc/volview/itk/image-io + return url; +} const itkConfig = { pipelineWorkerUrl: fullUrl('/itk/itk-wasm-pipeline.min.worker.js'), diff -urEb VolView-4.3.0.orig/vite.config.ts VolView-4.3.0/vite.config.ts --- VolView-4.3.0.orig/vite.config.ts 2025-01-16 18:46:08.862370324 +0100 +++ VolView-4.3.0/vite.config.ts 2025-01-16 19:12:29.866854537 +0100 @@ -114,6 +114,7 @@ }, ], }, + base: './', plugins: [ { name: 'virtual-modules',