booyeu / react-native-reanimated-viewer

A high performance image viewer in react-native created from react-native-reanimated.
130 stars 12 forks source link

Disable or enable image scaling when dragging up #3

Closed JuanRdBO closed 1 year ago

JuanRdBO commented 1 year ago

Currently, when dragging up, the image scale changes, but it would be so much more flexible to programmatically enable or disable this with props. Currently what causes this, is in the line

const changeHeight =
          (((currentOriginalImageSize?.height || 0) - screenDimensions.height) *
            (imageScaleValue === 1 ? imageYValue : 1)) /
          screenDimensions.height;

with the value of imageYValue.

llr101 commented 1 year ago

Thank you for your support, the props dragUpToCloseEnabled has been added in v1.0.1, you can see if it meets your needs, if there is any problem, you can reopen the issue