# First click-and-drag on 3D view

**URL:** <https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035>\
**Category:** Support\
**Created:** [June 15, 2020, 3:26pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035 "2020-06-15T15:26:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 15, 2020, 3:26pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/1 "2020-06-15T15:26:31Z")

</div>

Hi all,  
After a first 3D loading, the volume is well displayed and I want to use the mouse to rotate the 3D view.

I do not know why but the first click-and-drag event with the mouse moves one of the ROI side (I control one of the colored points of my ROI) even if my click is not over the node. After releasing the left button, the next click-and-drag allows me to rotate the 3D view.

Is there any function to call in the slicerrc file to avoid the phenomenum?

Best

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 15, 2020, 3:40pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/2 "2020-06-15T15:40:44Z")

</div>

It sounds like you are volume rendering with the cropping ROI enabled? You can turn off the visibility and it won’t be visible or selectable.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/b/5bbee767b8c8410eeba99de2605148ebc5947e51.png)

If that’s not it, post a screenshot and provide the exact steps.

---

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 15, 2020, 3:44pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/3 "2020-06-15T15:44:13Z")

</div>

Hello @pierper,  
Yes this is true, but I want to chane the camera rotation without disabling the Display ROI.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 15, 2020, 3:57pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/4 "2020-06-15T15:57:24Z")

</div>

I agree it can be inconvenient that the ROI widget grabs all the mouse events, but for now I think you just need to be aware of it, and either turn it off when not using it or maybe zoom out a bit with the mouse wheel before rotating.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 15, 2020, 4:58pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/5 "2020-06-15T16:58:56Z")

</div>

I think @ada refers to the bug that the first interaction in a 3D view after displaying a ROI adjusts that ROI.

As a workaround, you can click once in the 3D view before you click-and-drag the first time you show an annotation ROI.

Since a workaround exists and we will add much better ROI widget to markups module, I don’t think we will fix this bug.

---

<div class="post-metadata">

**Author:** ![ada](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ada/32/15944_2.png) [@ada](https://discourse.slicer.org/u/ada)\
**Post date:** [June 16, 2020, 12:40pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/6 "2020-06-16T12:40:18Z")

</div>

Yes @lassoan it is exactly what you are describing. I understand.

Nevertheless, is it possible to automatically create a “fake” click on the 3D view with python (as the user could do) ?  
For my use, it could be useful to automatically “fake” some mouse clicks

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 16, 2020, 1:03pm UTC](https://discourse.slicer.org/t/first-click-and-drag-on-3d-view/12035/7 "2020-06-16T13:03:43Z")

</div>

It would be just a workaround, but if you really need to you could use this testing method.

> <https://github.com/Slicer/Slicer/blob/276c72e150f62d719f75d1606a47f959557454b2/Base/Python/slicer/util.py#L1948>
