Crop widget handles moves only when dragging horizontally

Hi,
I have a problem with crop widget in vtk.js and I cannot find if my bug or vtk.js bug.
I try to explain: when dragging an handle, it seems that only the X movement of the mouse has an effect, while dragging in the Y direction has no effect.
I don’t know exactly where I can look for, as I’m using a very basic setup (genericRenderWindow + volumeMapper + cropFilter and cropWidget).
Thanks to anyone that can puts me in the right direction.
Mattia

Could you illustrate that via an animated gif or something similar?

FYI @Forrest

Yes, I’ll do it in a moment. I can add that it happens only with face handles and not corner handles.

Here’s the link to the video

Actually what we are seeing make sense as when you move vertically you are not changing the position of the plan.

Think of a virtual plan normal and based on where your mouse is and how to move a point along that virtual line intersect with your mouse pointer.
The Y axis is almost normal to that virtual plan normal. So moving along Y is not affecting the plane position along its normal.

Thank you, I see your point. But the same happens when I drag the handle on the top plane (ie horizontal plane). I can produce a video as well.

Here it is: DigletTK - VR example - Google Chrome 2021-05-11 18-16-59.mp4 - Google Drive

I have made a comparison between my application and vtk.js example.
I can reformulate the problem in these terms: when dragging an handles, in vtk.js example it remains under the cursor, in my app it does not.

Thank you for the time you are spending helping me.

Wow indeed, the second video really show the issue… I’m not sure what is the problem, but it is definitely a bug on the vtk.js side…

@Forrest

Thanks Sebastien! Should I fill an issue on github ?

I guess you did and Forrest already fixed it… Thanks!

Hi Sebastien, sorry for coming back to you after some time, but I was confident that the fix you mentioned would have solved my issue. Unfortunately, it has not.
I’m still facing the same problem after updating vtk.js (now at 18.7.2). Can you give me support again ? Should I share my code ?
Thanks in advance

I’ve also found that the behavior changes with the loaded image. I can share one of them if needed.
Notice that the issue is only present when dragging edges and faces handles. Corners handles seem always good.

Digging into image properties, I’ve found that the issue happens with images with origin different from 0,0,0. I’ve reproduced the issue into vtk.js example by setting image origin to (200, 200, 200).
If you can give me a hint of where in the source code this could affect the calculation, I can try to fix it.