cornerstoneTools
cornerstoneTools copied to clipboard
Cannot draw out of the viewport when scale is less than 1
Prerequisites
- [X] Which version are you using? (Is it latest?) 5.1.4 latest
- [X] Are you reporting to the correct repository?
- [X] Did you search existing issues? (Were any related?)
Description
Cannot draw out of the viewport.
Steps to Reproduce the issue
- The element size is 500x500 while scale is set to 0.5, so that it occupies 250 in width and height. Display correctly
- Open the code sandbox below. Select length tool.
- Draw a line out of the region of center 250x250, it disappears.
Expected behavior: (What you expected to happen) I wish to be able to draw outside the viewport. Why limit the drawing to the viewport?
Actual behavior: (What actually happened) When draw outside the viewport region, it disappears.
CodeSandbox With Reproduction of Issue:
https://codesandbox.io/s/lengthtool-yhypz?file=/src/components/SimpleExampleViewer.vue
I save the annotation data by handing the add and update events. I decided to check the coordinates of the viewport, if the drawing fall out of the viewport, I will delete it. So that to avoid confusing user. If the drawing disappear on screen, it shall get deleted from the data. This shall not be an issue