Avoid exceptions for disabled elements (PR #179)
If playClip is enabled and the user loads a different series in the viewport an exception will be thrown because the element will not be enabled anymore. Pull request https://github.com/chafey/cornerstoneTools/pull/179
This commit is contained in:
parent
a01a86ac7e
commit
aa88fe181a
@ -8947,7 +8947,15 @@ Display scroll progress bar across bottom of image.
|
|||||||
clearTimeout(resetPrefetchTimeout);
|
clearTimeout(resetPrefetchTimeout);
|
||||||
resetPrefetchTimeout = setTimeout(function() {
|
resetPrefetchTimeout = setTimeout(function() {
|
||||||
var element = e.target;
|
var element = e.target;
|
||||||
|
|
||||||
|
// If playClip is enabled and the user loads a different series in the viewport
|
||||||
|
// an exception will be thrown because the element will not be enabled anymore
|
||||||
|
try {
|
||||||
prefetch(element);
|
prefetch(element);
|
||||||
|
} catch(error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}, resetPrefetchDelay);
|
}, resetPrefetchDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user