These are chat archives for openseadragon/openseadragon

20th
Apr 2018
{ gilles : ''François'' }
@jilfransoi_twitter
Apr 20 2018 07:09
@iangilman you can see it live here (but the js is minified) https://levestiairedesbleus.intersport.fr/#/ when you open this on desktop, the image si dragable/panable when it is not zoomed, and that is not the behaviour I want. here is the code used to setup openseadragon :
            var viewer = OpenSeadragon({
                showNavigationControl:false,
                // zoomPerClick : 1,
                panHorizontal:true,
                panVertical:true,
                defaultZoomLevel:   1,
                minZoomLevel:   1,
                maxZoomLevel:   4,
                visibilityRatio: 1,
                animationTime:0.5,
                id: "vestiaire-zoomable",
                prefixUrl: "/static/js/openseadragon/images/",
                tileSources: [{
                    type: 'image',
                    url:  "/static/images/vestiaire-hd.jpg",

                }]
            });
(I will try to come up with a codepen as soon as possible)
thanks anyway
Ian Gilman
@iangilman
Apr 20 2018 16:34
@jilfransoi_twitter You can drag it, but now it snaps back fully when you drop it. That's what the visibilityRatio did for you.
Sounds like you don't want it to even move, though. Use constrainDuringPan: true for that.