cornerstoneTools icon indicating copy to clipboard operation
cornerstoneTools copied to clipboard

Cannot draw out of the viewport when scale is less than 1

Open rayhu opened this issue 5 years ago • 1 comments

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

  1. The element size is 500x500 while scale is set to 0.5, so that it occupies 250 in width and height. Display correctly
  2. Open the code sandbox below. Select length tool.
  3. 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

rayhu avatar Jun 11 '21 06:06 rayhu

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

rayhu avatar Jun 23 '21 05:06 rayhu