-
Notifications
You must be signed in to change notification settings - Fork 448
brush tool's passiveCallback throws when changing image if globalToolSyncEnabled is true #924
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
Description
Crashing Bug: using the Brush tool with globalToolSyncEnabled can cause the application to crash when a new element is enabled.
Steps to Reproduce
- initialize csTools with
{ globalToolSyncEnabled: true } - enable an element and load an image
- set the brush tool mode to "active"
- set the brush tool mode to "passive"
- enable a second element.
Expected behavior: [What you expected to happen]
The 2nd element should be enabled
Actual behavior: [What actually happened]
The application crashes with the following error.
Uncaught Error: updateImage: image has not been loaded yet
at Module.<anonymous> (cornerstone.js:7603)
at BrushTool.passiveCallback (cornerstoneTools.js:24482)
at setToolModeForElement (cornerstoneTools.js:11614)
at cornerstoneTools.js:11694
at Array.forEach (<anonymous>)
at _resolveInputConflicts (cornerstoneTools.js:11684)
at setToolActiveForElement (cornerstoneTools.js:11430)
at cornerstoneTools.js:10756
at Array.forEach (<anonymous>)
at _repeatGlobalToolHistory (cornerstoneTools.js:10753)
Reactions are currently unavailable