Use absolute path for webworker scripts

This commit is contained in:
dannyrb committed 2019-04-30 16:11:06 -04:00
1 parent 4cecdcc3dc
commit 686f613fd0
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -6,7 +6,9 @@ import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
* @param {String} webWorkScriptsPath
*/
export default function(baseDirectory, webWorkScriptsPath) {
const scriptsPath = `${baseDirectory}/${webWorkScriptsPath}`
const scriptsPath = `${window.location.protocol}//${
window.location.host
}${baseDirectory}/${webWorkScriptsPath}`
const config = {
maxWebWorkers: Math.max(navigator.hardwareConcurrency - 1, 1),
startWebWorkersOnDemand: true,