TiDraggable icon indicating copy to clipboard operation
TiDraggable copied to clipboard

Pinch to Rotate and Scale

Open ygbr opened this issue 11 years ago • 3 comments

Like the Ti.Draggable from @pec1985 does for iOS, it would be nice to have 2-finger (pinch) scale and rotation of the target views both for iOS and Android.

There is an Android native library that does this perfectly already: https://github.com/Almeros/android-gesture-detectors

There should be two boolean parameters for this: canResize and canRotate

This would be an awesome addition to TiDraggable, specially if parity is maintained between iOS and Android.

@iotashan already mapped the pinch events on Android on his last commit, we just need to scale / rotate the target views and also keep the rotating / scaling from original Pedro’s iOS module. Follows the commit link:

https://github.com/iotashan/TiDraggable/commit/fe2e4f7c32ac8ce80b8b1847d2831f4b4599c789

ygbr avatar Jan 23 '14 03:01 ygbr

@ygbr I've noted this as a future enhancement. As it stands I am still working on ensuring the current state of the modules works well cross-platform. I think that I am almost there in terms of stability, especially on Android. Once I see that the Android module has a 100% parity with iOS I will look at how this can be implemented. There aren't too many outstanding things on Android; Only fromCenter and callback constrainment functionality needs to be implemented.

Feel free to submit a PR if you happen to get around to it. As far as an ETA I don't really have one but expect to see this in 2.1.

animecyc avatar Jan 23 '14 15:01 animecyc

How can I catch the event for the resize and rotate?

Thank you very much.

I need some like a code example to do this. I understand with the @iotashan fe2e4f7 commit I can do it.

frodfigu avatar Jul 06 '14 21:07 frodfigu

Are there any news about pinch to resize? I would really need this for iOS and android.

Btw: in https://github.com/pec1985/TiDraggable there had been both parameter canResize and canRotate. No idea, why they are gone

caspahouzer avatar Apr 22 '15 07:04 caspahouzer