Git Product home page Git Product logo

Comments (3)

fengyuanchen avatar fengyuanchen commented on July 29, 2024

Unsupported.

from viewerjs.

Xavlight avatar Xavlight commented on July 29, 2024

Hi,

If it's not too late.
I've added arrows to the left and right for greater simplicity.

You'll need the 'https://fontawesome.com/' library that I used for the arrows.
I also used it to replace the pictos at the bottom (images) with 'fontaweasome' to get much better quality icons.

But there may be other possibilities in CSS.

in 'viewer = new Viewer(imagesviewer[0], {
ready() {
...//Here
}'

var gallery = $("#gallery img");
var viewer_arrows = '<div id="viewer-arrows" class="hidden">' +
'<a id="viewer-prev" class="fas fa-chevron-left" onclick="viewer.prev(loop=1);"></a>' +
'<a id="viewer-next" class="fas fa-chevron-right" onclick="viewer.next(loop=1);"></a>' +
'</div>';
$('.viewer-footer').append(viewer_arrows);
if (gallery.length > 1) $("#viewer-arrows").removeClass("hidden");

css

#viewer-prev, #viewer-next {
    position: absolute;
    z-index: 2020;
    font-size: 60px;
    bottom: 52px;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    -webkit-text-stroke-width: 1.5px;
    -webkit-text-stroke-color: white;
}

#viewer-prev {
    left: 2px;
}

#viewer-next {
    right: 2px;
}

#viewer-prev:hover, #viewer-next:hover {
    color: white;
    -webkit-text-stroke-color: black;
}

That's one aspect of the rendering.
Capture d’écran 2024-04-30 110813

If it helps anyone.
It would be great if this could be integrated into a future version.

Xav

from viewerjs.

XinChou16 avatar XinChou16 commented on July 29, 2024

prev and next button in the bottom toolbar is not convenient, look forward to have left and right arrow.

from viewerjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.