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.

OpenSeaDragon prevents swiping when combined with Swiper

See original GitHub issue

We’re using OSD with SwiperJS to show a gallery of product images in our online shop.

We noticed that it’s not possible to swipe through the gallery with gestures, even when OSD is fully zoomed out (see video):

https://youtu.be/UhA3qAxTHbU

How can we combine swiping through a gallery with pan zooming from OSD?

I’m aware of the fact that swiping while zoomed in doesn’t make much sense but when the image is fully zoomed out, it would be great if the user could swipe left/right through the gallery.

We init OSD with the following options:

viewers[index] = new OpenSeadragon({
    id: 'viewer-container-' + index,
    showHomeControl: false,
    showFullPageControl: false,
    navigatorSizeRatio: 0.25,
    wrapHorizontal: false,
    alwaysBlend: false,
    constrainDuringPan: true,
    visibilityRatio: 1.0,
    minZoomLevel: 1,
    maxZoomLevel: 4,
    prefixUrl: "/",
    zoomInButton: 'hse-zoom-in',
    zoomOutButton: 'hse-zoom-out',
    tileSources: img.zoomSrc,
    immediateRender: true
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
valnubcommented, Dec 16, 2016

@iangilman Thanks a lot for your effort! I’ll dig into this and see if it works.

0reactions
iangilmancommented, Dec 16, 2016

Cool. One thing I forgot to mention: of course OSD’s multi-image will handle lazy-loading for you; no tiles are loaded until the image is panned onto the screen. That said, if you’re using DZI or IIIF files, it does load the initial XML or JSON data for all of the images at once. There are ways to get around this if you need.

As for tracking (I assume you mean analytics), you’d have to watch the pan events and detect which image is shown and fire the appropriate analytics beacon as needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenSeadragon
An open-source, web-based viewer for high-resolution zoomable images, implemented in pure JavaScript, for desktop and mobile. OpenSeadragon Viewer With ...
Read more >
Newest 'openseadragon' Questions - Stack Overflow
I am trying to get the down arrow keyup event to fire automagically using jQuery. The annotorious/seadragon combination has a listener that opens...
Read more >
openseadragon - Bountysource
But on Ipad pro (11, with Ipad IOS 13.2.3 Chrome & Safari), as soon as I do a swipe or drag or pinch,...
Read more >
Swiper Plugin - Kaml Haus & Garten
The QuickBooks plugin does not have a "Swipe Card" button to press prior to ... In combination with the swiper-hero templates you are...
Read more >
Untitled
Instead use swipe up and down for zoom, pinch. ... might want this url into two or preventing hazardous rock types into an...
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