keske / react-native-easy-gestures

React Native Gestures. Support: Drag, Scale and Rotate a Component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help - rotation and scaling problem

jboteros opened this issue · comments

Hi how are you, I have problems with the rotation and the scale.

Use the component in the following ways and I can not get it to work.

<Gestures draggable={true} scalable={true} rotatable={true} onRelease={(event, styles) => { console.log(styles); }} > <Image source={Images.logoHeaderOrux} style={{ width: 200, height: 200, resizeMode: "contain" }} /> </Gestures>

and

<Gestures draggable={{ x: true, y: true }} scalable={{ min: 0.1, max: 200 }} rotatable={true} onRelease={(event, styles) => { console.log(styles); }} > <Image source={Images.facebook_icon} style={{ width: 200, height: 200, resizeMode: "contain" }} /> </Gestures>

Thanks

Hello.

I've tried your examples and both are ok.

Try this code:

<Gestures
  draggable={true}
  scalable={true}
  rotatable={true}
  onRelease={(event, styles) => {
    console.log(styles);
  }}
>
  <Image
    source={Images.logoHeaderOrux}
    style={{ width: 200, height: 200, resizeMode: 'contain' }}
  />
</Gestures>
<Gestures
  draggable={{ x: true, y: true }}
  scalable={{ min: 0.1, max: 200 }}
  rotatable={true}
  onRelease={(event, styles) => { console.log(styles); }}
>
  <Image
    source={Images.facebook_icon}
    style={{ width: 200, height: 200, resizeMode: "contain" }}
  />
</Gestures>