Skip to content

Reset image-scale in ViewPager #36

Description

@justinhouse

I'm not sure if it's possible, but when using this on Android in combination with the ViewPager as suggested - I'd prefer it if pages/images out of view reset to their initial scale of 1.0. When a a user swipes to a page the 1.0 scale gives them the most ideal version within the context of a gallery.

I tried getting a reference to the ViewManager/'ImageViewZoom'. This has a @ReactProp annotation, but that only seems to get triggered on it's initial render. imageReference.scale = 1 does nothing for example (doesn't trigger in Java-code even).

Getting the ZoomImage in index.android.js to render again with the property 'scale' set to '1' doesn't reset it back after it's been initially rendered either.

I'm fairly new to ReactNative so maybe what I want is not done, or I'm missing the proper way to go about this. Either way, if there's some pointers to be given that would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions