Giter Site home page Giter Site logo

Comments (4)

mironovpib101 avatar mironovpib101 commented on June 2, 2024

Use this.onMove and this.swap for update next/this/prev image

Code

<Image
style={GalleryStyle.detailImage}
source={this.state.rightImage}
onError={()=>this.setState({rightImage:require("resource/images/not-photo.png")})}
/>
<ImageZoom
onClick={()=>this.setState({show: !this.state.show})}
doubleClickInterval={1}
ref={ref=>this._image = ref}
cropWidth={window.width}
cropHeight={window.height}
imageWidth={window.width}
imageHeight={window.height}
responderRelease={this.swap}
maxOverflow={100}
horizontalOuterRangeOffset={this.onMove}
>
<Image
style={GalleryStyle.detailImage}
resizeMode={Image.resizeMode.cover}
source={this.state.photo}
onError={()=>this.setState({photo:require("resource/images/not-photo.png")})}
/>
</ ImageZoom>
<Image
style={GalleryStyle.detailImage}
source={this.state.leftImage}
onError={()=>this.setState({leftImage:require("resource/images/not-photo.png")})}
/>

from react-native-image-zoom.

sroze avatar sroze commented on June 2, 2024

What are these this.swap and this.onMove ?

from react-native-image-zoom.

bucketclan avatar bucketclan commented on June 2, 2024

horizontalOuterRangeOffset is never called.

from react-native-image-zoom.

mironovpib101 avatar mironovpib101 commented on June 2, 2024

my created function
onMove = offset => {
//save offset image
};
swap = () => {
// testing offset for swap image
}

from react-native-image-zoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.