Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue with panning #344 #423

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

RebeccaNowak
Copy link
Collaborator

now manually setting pan to false on EndDragging (also works for middle mouse button / pan)

@haraldsteinlechner
Copy link
Collaborator

cool thanks for finding out this one! What's going on here in a broader sense?

   | StartDragging _,_,_ 
   | Dragging _,_,_ 
   //| MouseOut _,_,_
   | EndDragging _,_,_ -> 
     let m' =
           match m.multiSelectBox with
           | Some x -> { m with multiSelectBox = None }
           | None -> m
     m' //{m' with navigation = {m'.navigation with camera = {m'.navigation.camera with pan = false }}}

All of those, StartDragging, Dragging and EndTragging do the same, namely setting multiselectBox to none. Btw, MouseIn and MouseOut are never emitted in ViewerGui.

Seems to be related to multiselectBox - which is dead? isn't it? shall we remove all of those altogether (createMultiSelectBox and all those handlers listed above?)

@RebeccaNowak
Copy link
Collaborator Author

What's going on in a broader sense: The middle mouse button is used by browsers for various actions, and they sometimes (and depending on the browser of course) interfere when you want to use middle mouse button events. Also, browsers sometimes even override/ignore "preventDefault()" for these actions. I suspect that's why the mouseOut event does not fire while the middle mouse button is pressed (I tried this out). So we can't use mouseOut / mouseIn to solve this. However, onMouseUp does fire and so we can use this.

As for the multiselectBox: I didn't know anything about that, so I left the functionality as it was. If it's not in use any more we can remove that code entirely.

@haraldsteinlechner
Copy link
Collaborator

Let's merge this one - but let's keep the issue open, after updating the media packages we can clean up the code and remove the unnecessary handlers.

@haraldsteinlechner haraldsteinlechner merged commit 37e8619 into develop Oct 9, 2024
6 checks passed
@haraldsteinlechner haraldsteinlechner deleted the bugs/panHangingIn3d branch October 9, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants