Zoom handles wrong slide
See original GitHub issueThis is a (multiple allowed):
-
bug
-
enhancement
-
feature-discussion (RFC)
-
Swiper Version: v4.3.3 release, 0dcd6ca
-
Platform/Target and Browser Versions: Chrome 69.0.3497.100 on Ubuntu 18.04.1 LTS
What you did
Configured Swiper to simulate touch and use zoom with toggle.
- Initialize Swiper
- Double click on slide to zoom in
- Call
mySwiper.slideNext()
ormySwiper.slideTo()
to switch to the next slide - Call
mySwiper.zoom.in()
Expected Behavior
The current slide should be zoomed.
Actual Behavior
The previous slide is zoomed
Notes
- With simulate touch is activated, a double click on the slide, or switching a slide via navigation button invokes
updateClickedSlide(e)
- This updates
swiper.clickedSlide
andswiper.clickedIndex
to the current slide - Calling
mySwiper.slideTo()
doesn’t invokeupdateClickedSlide(e)
, thereforeswiper.clickedSlide
andswiper.clickedIndex
were not updated. - Calling
mySwiper.zoom.in()
again checks forgesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
- Where
swiper.activeIndex
points the the current slideswiper.clickedSlide
still points to the previous slide
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Controlling slides shared by another participant - Zoom Support
A presenter in a meeting or webinar can give slide control to other participants, so that others can control the progression of slides......
Read more >Get Rid of Those Gray Boxes in Zoom - The WebiNerd LLC
Those gray boxes that float over your shared screen when presenting in a webinar are annoying! Find out why it happens and how...
Read more >How to professionally handle an awkward Zoom interruption
“Do the best you can do,” she says. “Demonstrate that mistakes are acceptable. This helps you connect to your audience to create more...
Read more >FAQs | Zoom - PowerPoint Slide Library
How many slides can Zoom handle? ... Zoom doesn't have a menu bar, how do I work with it? ... I get a...
Read more >Replicating the classroom experience in zoom during covid ...
I teach an engineering class and pre-covid used to use Powerpoint slides projected on to a whiteboard so I could easily annotate on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have done my workaround like this: In zoom.in and zoom.out functions I’ve commented out the parts where it uses the clicked slide and left just the part where it uses the activeIndex:
gesture.$slideEl = /*swiper.clickedSlide ? $(swiper.clickedSlide) :*/ swiper.slides.eq(swiper.activeIndex);
In the previous post by @ms-ox the Expected Behavior and Actual Behavior text should be reversed. The expected behavior is that the current slide should be zoomed.