zingtouch icon indicating copy to clipboard operation
zingtouch copied to clipboard

rotate one input touch creating problem

Open monukanyal opened this issue 9 years ago • 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.

monukanyal avatar Jun 16 '17 03:06 monukanyal

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

mike-schultz avatar Jun 16 '17 15:06 mike-schultz

Hello @mike-schultz ,

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

monukanyal avatar Jun 17 '17 06:06 monukanyal

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

mike-schultz avatar Jun 20 '17 15:06 mike-schultz

Closed due to inactivity

mike-schultz avatar Mar 26 '18 20:03 mike-schultz