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

How to prevent jmpress capturing touch events. #142

Open
SkeLLLa opened this issue Feb 17, 2014 · 7 comments
Open

How to prevent jmpress capturing touch events. #142

SkeLLLa opened this issue Feb 17, 2014 · 7 comments

Comments

@SkeLLLa
Copy link

SkeLLLa commented Feb 17, 2014

Hello. I use three.js component with camera controls inside jmpress slide.
When I use mouse on PC, all works well and when I hold LMB and drag mouse it rotates my 3d object. But on tablet when I start touch in jmpress div it switches slide instead of rotating 3d object. If I start touch outside of jmpress container all works well.

I think that somewhere jmpress setting it's own handler on container element and preventing event bubbling to document element, where three.js bind it's own handlers.

So the question is how to prevent jmpress handling touch events at all?

@sokra
Copy link
Member

sokra commented Feb 17, 2014

Shoudn't three.js bind its touch events to the three.js container?

@MiD-AwE
Copy link

MiD-AwE commented Feb 17, 2014

I use X3DOM and everything works as expected.

@SkeLLLa
Copy link
Author

SkeLLLa commented Feb 17, 2014

@sokra three.js container could be rather small, so it will be hard to put finger on it on devices with small displays. Also when three.js controls are binded to document we can rotate multiple 3d scenes simultaneously.
As I said mouse works well, so I think only touch events are prevented. And also we actually don't need to switch slides on touch swipe, so by disabling we will kill two birds with one stone.

@MiD-AwE X3DOM is wonderful product, but unfortunately we need to support IE10 on windows rt and native iOS browser on iPads. So for now we're limited to three.js because it can work without webgl.

@shama
Copy link
Member

shama commented Feb 17, 2014

@SkeLLLa Are you able to post an example online for us to check it out?

@SkeLLLa
Copy link
Author

SkeLLLa commented Feb 17, 2014

@shama Ok, I'll create jsfiddle to isolate issue tomorrow.

@SkeLLLa
Copy link
Author

SkeLLLa commented Feb 18, 2014

I've isolated issue http://skellla.bitbucket.org/jmpress/sample.html#/step-2 in this sample (jsfiddle refused to work correctly with jmpress or may be I'm just a noob).
For now I can't see a part of issue. In isolated sample I can rotate my model with touch. So maybe issue is located somewhere in my app. I'll continue to investigate it.

But other part of an issue is still present. When I rotate my model with touch it also switches the slide after touchend. I don't need this, because in my app I shall have "back" and "forward" buttons or even slide switch will be controlled from remote machine via websockets on something like this. So I still looking for the solution for disabling slide switch via touch.

@MiD-AwE
Copy link

MiD-AwE commented Feb 18, 2014

@skella Yeah that is my one qualm. I hope that the apple support works out too. As for IF 10, X3DOM uses a flash wrapper. But, I imagine in your situation no apple support is a deal breaker.

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

No branches or pull requests

4 participants