SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

How to distinguish the number of fingers touched in the function OnManipulationdelta?

28 Jan 2021, 04:19

Hello,
I wanna to select things with one finger pan gesture and move the canvas with two fingers pan gesture. How can I distinguish them in the function OnManipulationdelta? Or how to make one finger pan gesture do not call the function OnManipulationdelta? Hope for your reply.
 
User avatar
jsantos
Site Admin
Posts: 3018
Joined: 20 Jan 2012, 17:18
Contact:

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

28 Jan 2021, 11:21

In WPF, ManipulationDeltaEventArgs provides a Manipulators property for that purpose. It is not implemented in Noesis, please create a ticket about it.

An easy workaround is manually counting the number of fingers using TouchDown and TouchUp events.
 
SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

28 Jan 2021, 11:52

In WPF, ManipulationDeltaEventArgs provides a Manipulators property for that purpose. It is not implemented in Noesis, please create a ticket about it.

An easy workaround is manually counting the number of fingers using TouchDown and TouchUp events.
Thanks for your reply.OnManipulationdelta is called after touchdown. But TouchUP wouldn’t be called after OnManipulationdelta.So I can not count the number of fingers using TouchDown and TouchUp events.Is there any other way to solve this problem? And I am sorry I can not get “ create a ticket about it”.
 
User avatar
jsantos
Site Admin
Posts: 3018
Joined: 20 Jan 2012, 17:18
Contact:

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

28 Jan 2021, 14:02

TouchDown happens before the manipulation, so you could use that to count the number of fingers and reset the counter when the manipulation ends. But yes, this solution is far from perfect and won't always work.

Please, open a ticket at the tracker for implementing the vector of Manipulators (as in WPF).
 
SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

29 Jan 2021, 10:00

TouchDown happens before the manipulation, so you could use that to count the number of fingers and reset the counter when the manipulation ends. But yes, this solution is far from perfect and won't always work.

Please, open a ticket at the tracker for implementing the vector of Manipulators (as in WPF).
Thanks for your reply.It has worked in my app.And the ticket has been created.
 
SenlyCamile
Topic Author
Posts: 11
Joined: 15 Jan 2021, 07:38

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

29 Jan 2021, 10:24

TouchDown happens before the manipulation, so you could use that to count the number of fingers and reset the counter when the manipulation ends. But yes, this solution is far from perfect and won't always work.

Please, open a ticket at the tracker for implementing the vector of Manipulators (as in WPF).
And one more question,e.deltaManipulation.translation is similar when I pinch and pan with two fingers in the function OnManipulationdelta.And it is hard to keep the distance when I pan with two fingers. I wanna to pan with no pinch and pinch witch no pan. But It is not so robust judging them just by e.manipulation.scale.Any suggestions about it?
 
User avatar
jsantos
Site Admin
Posts: 3018
Joined: 20 Jan 2012, 17:18
Contact:

Re: How to distinguish the number of fingers touched in the function OnManipulationdelta?

29 Jan 2021, 11:18

You could ignore the rotation component when only one finger is active, and ignore the translation component when two fingers are active. Or the first time you detect a scale (pinch) enter a special mode where only scale (no rotation) is allowed. Just random ideas. This is also a UX decision.

Who is online

Users browsing this forum: Bing [Bot] and 0 guests