Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNLOCK image if image is zoomedOut #124

Merged
merged 7 commits into from
Apr 18, 2019
Merged

UNLOCK image if image is zoomedOut #124

merged 7 commits into from
Apr 18, 2019

Conversation

Carlit0
Copy link
Contributor

@Carlit0 Carlit0 commented Apr 13, 2019

GREAT REPO! 👍

I have added two more scaleStates: 'zoomedIn' and 'zoomedOut'.
The trigger between those two states is currently the initialScale:

zoomedOut <= initialScale < zoomedIn
zoomedOut -> unlocks the image
zoomedIn -> locks the image

The (default)StateCycle stays the same.
However, the scaleState 'zooming' becomes unnecessary.

I've encountered some performance issues, so I've implemented a new stream that will fire ONLY if a scaleState change is detected.

At this point, the additional customization of the trigger point will be EASY :)

i guess this will fix #105
and is at least an approach for #41

Carlit0 added 5 commits April 13, 2019 02:23
this is for better performance
if the user scales the image bigger than its initialScale the scaleState will be 'zoomedIn'
...
otherwise -> 'zoomedOut'

currently the trigger point is the initialScale

at this point additional customization of the trigger point will be EASY
@renancaraujo
Copy link
Member

renancaraujo commented Apr 16, 2019

Thanks for your contribution.
I absolutely loved the idea of creating an exclusive stream for the scaleState value.
Regarding #41, I Think the solution will remove the locking behavior independently to the scaleState.

I will look carefully into it.

@renancaraujo
Copy link
Member

lgtm2

@renancaraujo renancaraujo merged commit da26a6f into bluefireteam:master Apr 18, 2019
CarSmallGuo pushed a commit to CarSmallGuo/photo_view that referenced this pull request May 29, 2019
UNLOCK image if image is zoomedOut
CarSmallGuo pushed a commit to CarSmallGuo/photo_view that referenced this pull request May 30, 2019
UNLOCK image if image is zoomedOut
CarSmallGuo pushed a commit to CarSmallGuo/photo_view that referenced this pull request May 30, 2019
UNLOCK image if image is zoomedOut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PhotoViewGallery swipe glitch
2 participants