zingchart/zingtouch

rotate one input touch creating problem

Closed this issue · 4 comments

Hello,
please guide me on below problem:
A Rotate is detected when:
1)the user has two inputs moving about a circle on the edges of a diameter.
2)the user has one input moving in a circular motion around the center point of the bound target element.
I don't want to use one input rotate because in this case i am using drag. but it is rotating image. is there any way to stop aur disable one input roation? please help.

Hey @monukanyal

Thanks for pointing that out. I've added a parameter 'minInputs' in the Rotate constructor to restrict the minimum of inputs needed. In your case, just set the minInputs to 2.

const yourRegion = new ZingTouch.Region(<your-region>);
const customRotate = new ZingTouch.Rotate({
  minInputs: 2
});
yourRegion.bind(<your-element>), customRotate, function(e) {
 ...
});

It's located on the rotate branch here: https://github.com/zingchart/zingtouch/tree/rotate/dist.
Let me know if that works out and I'll push out a new version with it

Hello @mike-schultz ,

Its not working. i have already tried it . it is working in both one input and two input.

What environment/devices are you testing it with? Can you verify this demo is still causing you issues? https://jsfiddle.net/c8k14snx/

Closed due to inactivity