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

Propeller on touch screen windows doesn't work #42

Open
pixxaro-festilight opened this issue Oct 3, 2022 · 3 comments
Open

Propeller on touch screen windows doesn't work #42

pixxaro-festilight opened this issue Oct 3, 2022 · 3 comments

Comments

@pixxaro-festilight
Copy link

Hello I used this script on my web site but it doesn't work on touch screen on my computer.
I tried to change on tablet mode, tried egde, chrome, firefox, tried to change settings on them, but no way.
I thing my finger doesn't send the real code ontouchstart.

do you have an issue please?

@PixelsCommander
Copy link
Owner

This would be strange as library is 5 years old and there are no changes in api

@pixxaro-festilight
Copy link
Author

it works on iphone, but no on windows on browser

@pixxaro-festilight
Copy link
Author

I delete the condition about 'ontouchstart' and it works with the finger.
but, there is no inertie when I spin and I left the screen.
/* if ('ontouchstart' in document.documentElement) { */
var force_tactile=1;
if (force_tactile==1) {

        this.touchElement.addEventListener('touchstart', this.onRotationStart);
        this.touchElement.addEventListener('touchmove', this.onRotated);
        this.touchElement.addEventListener('touchend', this.onRotationStop);
        this.touchElement.addEventListener('touchcancel', this.onRotationStop);
        this.touchElement.addEventListener('dragstart', this.returnFalse);
    } else { 
        this.touchElement.addEventListener('mousedown', this.onRotationStart);
        this.touchElement.addEventListener('mousemove', this.onRotated);
        this.touchElement.addEventListener('mouseup', this.onRotationStop);
        this.touchElement.addEventListener('mouseleave', this.onRotationStop);
        this.touchElement.addEventListener('dragstart', this.returnFalse);
    }

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

2 participants