question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zoom handles wrong slide

See original GitHub issue

This 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.

  1. Initialize Swiper
  2. Double click on slide to zoom in
  3. Call mySwiper.slideNext() or mySwiper.slideTo() to switch to the next slide
  4. 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 and swiper.clickedIndex to the current slide
  • Calling mySwiper.slideTo() doesn’t invoke updateClickedSlide(e), therefore swiper.clickedSlide and swiper.clickedIndex were not updated.
  • Calling mySwiper.zoom.in() again checks for gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
  • Where swiper.activeIndex points the the current slide swiper.clickedSlide still points to the previous slide

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
daliborkovaccommented, Jan 18, 2019

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);

1reaction
daliborkovaccommented, Jan 18, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found