Jump to content
Search Community

Draggable - onDrag - PC vs Mobile

Greg Stager test
Moderator Tag

Recommended Posts

I created a "calculator" that uses draggable sliders to set the various values associated with each one.

It seems to function exactly as expected on a PC.

However, when pulling it up on an iPad - the sliders will respond to touch and go up and down just fine but the values will only change once instead of changing constantly along the full range of the slider. The sliders do not lock up or anything - they continue to move but it seems the onDrag function does not fire after the first time like it does on the PC.

 

Is there another consideration related to this that I should have in mind when making something work on mobile?

 

Here is an example of the code for one of the slider knobs.

Draggable.create("#knob3c", {
type: "y",
bounds: {minY: 0, maxY: -180},
onDrag: function() {
y3Pos=Math.ceil((this.y*-50)/1000)*1000;
cap();
calc();
}
});

As the slider moves it should constantly update the calculations by determining a value based on slider position and calling a couple other functions to deliver the final result. Again - it works fine on PC.

 

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...