From 0c021016d51235edca938e7e746af8726cc87c7d Mon Sep 17 00:00:00 2001 From: m00n620 <50647994+m00n620@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:13:26 -0500 Subject: [PATCH] fix prefetch priority (#122) --- extensions/cornerstone/src/init.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/cornerstone/src/init.tsx b/extensions/cornerstone/src/init.tsx index 64b5b7b2bd0..a9ebf0479a9 100644 --- a/extensions/cornerstone/src/init.tsx +++ b/extensions/cornerstone/src/init.tsx @@ -213,7 +213,7 @@ export default async function init({ commandsManager, }); - let priorityCounter = -100; + let priorityCounter = 1000000; let enabledElementCounter = 0; let STUDY_STACKS = []; @@ -338,7 +338,7 @@ export default async function init({ setTimeout(() => { console.log('All elements are enabled. Start prefetching images.'); - STUDY_STACKS.forEach(stack => stackPrefetch.enable(stack, 0)); + STUDY_STACKS.forEach(stack => stackPrefetch.enable(stack, priorityCounter)); }, 2000); eventTarget.removeEventListener(EVENTS.ELEMENT_ENABLED, elementEnabledHandler);