Giter Club home page Giter Club logo

Comments (3)

inklingsofreality avatar inklingsofreality commented on June 27, 2024 1

I would like to comment that @ericthelast gist works for the autoplay part.

What I am trying to add to it is the flipping to the back after it shuffles to the next image, then flips to the front, and then shuffles again.

I, too, need it to pull in new images, but that's later down the road.

The issue I have is in finding the function that actually does the flipping. I cannot tell if it is in the CSS or in the js file. There is nothing that explicitly tells it to flip. It also seems to somehow be tied to the navigation bar, which I need turned off and have been able to do so.

Any thoughts on where the flipping functionality resides? And no, that's not a euphemism...;)

Update: The code appears to be in _rotateItem and one should be able to call it by saying ps._rotateItem(), but it doesn't appear to be working. If I get it working, I'll let you know.

The following allows you to hide the navigation, rotate the image after 3 seconds, rotate it back after 3 seconds and then proceed to the next item..

new Photostack( document.getElementById( element ), {
              // any other options here,
                showNavigation: false,                
                afterShowPhoto: function(ps) {
                    setTimeout(function() {
                        ps._rotateItem();
                        setTimeout(function() {
                            ps._rotateItem(); 
                            setTimeout(function() {
                                ps._navigate('next');
                            }, 3000);
                        }, 3000);
                    }, 3000);
                }                
            });

from scatteredpolaroidsgallery.

ericthelast avatar ericthelast commented on June 27, 2024

Hey @hungrysquirrel, happy to help.

I've created this gist detailing how both features could be accomplished. Check that out and let me know if it helps. One way that code could be improved would be to check for when a user does click so that you can clear the timeout.

Anyhoo, hope that helps!

from scatteredpolaroidsgallery.

bheijns avatar bheijns commented on June 27, 2024

Hi @ericthelast ,

I can't get it to work on autoplay... Can you please help me out? What I want to do:

  1. Autoplay --> If it's possible to make a nice kind of refresh each two minutes or so it would be great (because our image folder is always being filled).
  2. When a backside of an image (description) is available rotate the image after a couple seconds to show the back; after that resume autoplay.

Can you or somebody else help me out?

Thank you so much in advance.

Bas

from scatteredpolaroidsgallery.

Related Issues (13)

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.