Skip to content

Commit

Permalink
fix: Add reverse() back when adding images to queue in stackPrefetch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
swederik authored Oct 1, 2021
1 parent fdb0e47 commit e81f1b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stackTools/stackPrefetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function prefetch(element) {
requestFn = id => external.cornerstone.loadAndCacheImage(id, options);
}

imageIdsToPrefetch.forEach(imageId => {
imageIdsToPrefetch.reverse().forEach(imageId => {
external.cornerstone.imageLoadPoolManager.addRequest(
requestFn.bind(null, imageId),
requestType,
Expand Down

1 comment on commit e81f1b6

@webkriativa-gabriel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be configurable like maxImagesToPrefetch.

Please sign in to comment.