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

Switch peek values after swipe #77

Closed
sdeseive opened this issue Jul 28, 2022 · 1 comment · Fixed by #86
Closed

Switch peek values after swipe #77

sdeseive opened this issue Jul 28, 2022 · 1 comment · Fixed by #86
Labels
resolved Pending release
Milestone

Comments

@sdeseive
Copy link

sdeseive commented Jul 28, 2022

Hi,

i want to change the peek-left and the peek-right value after swiping to the next image, but after changing the peek values the calculation of the transform: translateX() value is wrong. Is there a way to change the peek values on the fly?

I start with peek-left: 0 and peek-right: 15%, after the first change I want both to be 15%, so that the 2nd image is centred. when we reach the last image, peek-left should be 15% and peek-right 0

best regard

@weotch
Copy link
Member

weotch commented Aug 30, 2022

If you ran capturePeekingMeasurements() after changing those values, I think it should force the translateX() to update. Like if you did $refs.slider.capturePeekingMeasurements() from your code.

I may add a watcher to the peekLeft and peekRight props to calls this automatically if those values change...

@weotch weotch added this to the 1.5 milestone Aug 31, 2022
@weotch weotch linked a pull request Aug 31, 2022 that will close this issue
@weotch weotch added the resolved Pending release label Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved Pending release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants