Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 1, 2021

Related issue: Fixed #22470

Description

The view helper now uses pointer events.

@mrdoob mrdoob added this to the r133 milestone Sep 1, 2021
@mrdoob mrdoob merged commit f4515f6 into mrdoob:dev Sep 1, 2021
@mrdoob
Copy link
Owner

mrdoob commented Sep 1, 2021

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Sep 1, 2021

By the way, we should probably add a pointercancel listener next to every pointerup.
pointercancel dispatches every time the OS gets ahold of the pointer (like when doing edge gestures on mobile oses).

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Sep 2, 2021

So you mean this pattern?

function onPointerUp () {

    // some code

}

domElement.addEventListener( 'pointerup', onPointerUp ) ;
domElement.addEventListener( 'pointercancel ', onPointerUp ) ;

@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2021

Yep!

@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2021

/cc @fernandojsg

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Sep 2, 2021

Um, is it possible that pointerup and pointercancel are fired in the same situation? Or can one safely state that after a pointercancel no pointerup occurs?

@mrdoob
Copy link
Owner

mrdoob commented Sep 2, 2021

I think pointerup event shouldn't dispatch after pointercancel... 🤔
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointercancel_event

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.

Editor: View Helper does not align the camera to the selected axis

2 participants