Jump to content
Search Community
tupic test
Moderator Tag

Go to solution Solved by tupic,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Dear Community

 

I am new in webdevelopment. So I started my first cordova project.

In the codepen-example you can see my code. It works well on desktop browsers. 

But when I test my code on an mobilephone the img  #main-menue-knob can't get dragged.

Is there any eventlistener that  I have to add, that the drag-function works on a touchevent?

 

Thanks for support

 

Tupic

See the Pen WwejNe by anon (@anon) on CodePen

Link to comment
Share on other sites

I don't see anything that's obviously wrong from my cursory glance, but I did want to mention:

  1. We don't recommend linking to the "latest" CDN directory because the CDN host stopped supporting that (out of our control) back at version 1.17.0. So your codepen is using stale files. So instead of /latest/, you should link directly to a number like /1.18.2/. So https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js becomes https://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.2/TweenMax.min.js
  2. You're not loading ThrowPropsPlugin, so you won't get the smooth continuation of movement when you flick. That's a membership benefit of Club GreenSock but you can use it for free on codepen with this URL: https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/ThrowPropsPlugin.min.js
  3. My understanding is that Cordova is a 3rd party tool that compiles HTML/CSS/JS to native code on phones, thus the problem you ran into very likely has to do with Cordova itself. I'm not familiar with it or its quirks. You might want to contact them. 
  4. I'm pretty confident that Draggable has been used on Samsung Galaxy S* phones without any problem at all. 
  5. Does it work if you remove your alert()? Just curious. 
  • Like 1
Link to comment
Share on other sites

  • Solution

Ok guys I've found the problem. The Greensock-Plugins work well. It was my rookie-mistake. I tried to initialize the draggable element before it was append to the DOM. Now it works as it supposed to work. Thank you guys for support.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...