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);
|
||||
resetPrefetchTimeout = setTimeout(function() {
|
||||
var element = e.target;
|
||||
prefetch(element);
|
||||
|
||||
// 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);
|
||||
} catch(error) {
|
||||
return;
|
||||
}
|
||||
|
||||
}, resetPrefetchDelay);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user