You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ScaleOverlayTool annotation object is successfully added to the annotation manager at its first call of _init() function in which addAnnotation() is called, however, as of second call of it, addAnnotation() is not called. That's because viewportsWithAnnotations that stores which viewports have an annotation prevents _init() from calling addAnnotation(), but there is no logic removes viewports from viewportsWithAnnotations array. So even after removing annotation with something like annotation.state.removeAllAnnotations(), you cannot add ScaleOverlay annotation again, which results in fail of rendering scale overlay.
Steps to Reproduce
Enable ScaleOverlayTool (this will call _init())
removeAllAnnotations()
Enable ScaleOverlayTool again
Uncaught TypeError from ScaleOverlayTool.renderAnnotation()
The current behavior
Can't render ScaleOverlayTool
The expected behavior
Render ScaleOverlayTool
OS
Windows 10
Node version
20.11.1
Browser
Chrome 128.0.6613.85 64bit
The text was updated successfully, but these errors were encountered:
Describe the Bug
The ScaleOverlayTool annotation object is successfully added to the annotation manager at its first call of _init() function in which addAnnotation() is called, however, as of second call of it, addAnnotation() is not called. That's because viewportsWithAnnotations that stores which viewports have an annotation prevents _init() from calling addAnnotation(), but there is no logic removes viewports from viewportsWithAnnotations array. So even after removing annotation with something like annotation.state.removeAllAnnotations(), you cannot add ScaleOverlay annotation again, which results in fail of rendering scale overlay.
Steps to Reproduce
The current behavior
Can't render ScaleOverlayTool
The expected behavior
Render ScaleOverlayTool
OS
Windows 10
Node version
20.11.1
Browser
Chrome 128.0.6613.85 64bit
The text was updated successfully, but these errors were encountered: