99 views
in Embedded Wizard Studio by
Hi EW Team,

I have a question regarding the SpeedLimit property of the SlideTouchHandler. I want to have a behaviour where I would like to limit the maximum speed of slide between 2 dragging interaction, meaning if at T1 i have, as offset <0,0>, at T2 i can not have offset <50,0>  if I said SpeedLimit = 40.0

Is this how speedLimit is intended to be used? If not, how could I implement this kind of behavior (i.e. : limiting the speed of dragging)

Have a good day

2 Answers

0 votes
by

Hello Velas,

as its name indicates SpeedLimit limits the maximum speed. The section Configure the acceleration characteristics describes its functionality. Here the screenshot from the doc:

Best regards

Paul Banach

by
------ comment deleted ------
0 votes
by

Hi,
Sorry but this does not reply to my question. To make it more evident, I made a toy project showing my concern. In this example, I can have an offset at 50 while holding the slide touch handler because it only seems to affect take effect when I release my finger.

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=4145181176149039993

Best Regards

by

Hello,

I'm sorry, but I don't understand your concern.

I can have an offset at 50 while holding the slide touch handler because it only seems to affect take effect when I release my finger.

I don't understand what behaviour the example application should demonstrate.

Best regards

Paul Banach

by

My concern is that, in the application I have sent you, you can go faster than 5.0 pixel per second (which is the speed limit I have set for the SlideTouchHandler). I know I go faster than this speed limit thanks to the Offset on the screen. Here's a link to a video of the app. https://ask.embedded-wizard.de/?qa=blob&qa_blobid=4287013486511847832

In other words, between 2 OnSlide event, I have a delta on the SlideTouchHandler's Offset greater than SpeedLimit which seems counter intuitive to me.

Is it more clear ? Don't hesitate to tell me

Best Regards

by

Hello Velas,

there are three aspects to take in account:

1. The speed when the user actively drags the finger. It means the speed corresponding to the movement of user's finger.

2. The speed after the user finished the interaction. It means the animation which continues sliding the content for a short period when the user doesn't touch the screen.

3. As long as the user actively touches the screen, the resulting sliding follows 1:1 the finger movements. When the user finishes the interaction, the sliding continues running with speed corresponding to a speed vector resulting from preceding user interaction. If the user 'nudges' the screen multiple times, the speed vector is accumulated to get larger speed.

This behavior imitates a physical system with a mass and friction. Just like in the real world, when you grab and move an object, the object follows the movement at your speed. Consequently, the slide speed (from 1 above) corresponds to the movement of user's finger. There is no configuration to limit this value.

The property SpeedLimit affects the animation only (from 2 above). Together with Friction it allows the user to configure the dynamic of the animation.

If your application case requires other behavior, you would need to implement your own sliding mechanisms using the lower level handler Simple Touch Handler.

I hope it helps you further.

Best regards

Paul Banach

by
Ok thank you, yes it is more clear now. I did not made the differenciation between the 1. and 2. in your comment.

Have a nice day

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...