Giter Club home page Giter Club logo

coverflow's People

Contributors

elboletaire avatar misiur avatar ricardo-marques avatar vanderlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coverflow's Issues

Set Index: Quicker Change

Hi,

Already solved this issue so I thought I'd share.
The issue was with setting the index.
I have a cover flow that can have up to 200 covers
so it slows the animation considerably.

I used your .coverflow('index', position) method to change
but it was taking a lot time to transition from first to last or vice versa.
There is a workaround however as seen in the following code snippet.
It skips the transitioning and goes straight to the index you want.
you just need to call the index you want, then call the one above it
and finally call the one you want again.

$('.firstPos').click(function() {
    $('.coverflow').coverflow('index', 0);//The index you want to go to
    $('.coverflow').coverflow('index', 1);//The one above it
    $('.coverflow').coverflow('index', 0);//The index you want to go to
});

$('.middlePos').click(function() {
    var middle = Math.floor(($('.cover').length - 1) / 2);
    $('.coverflow').coverflow('index',middle);
    $('.coverflow').coverflow('index',middle);
    $('.coverflow').coverflow('index',middle+1);
});

$('.lastPos').click(function() {
    $('.coverflow').coverflow('index', -1);
    $('.coverflow').coverflow('index', -2);
    $('.coverflow').coverflow('index', -1);

});

Best,

Peader

Next and Prev arrow

i can't add next and prev arrow in this slider can you please help me to edit code ? as soon as possible

Suggestion for new event

When doing something like this:

$(".coverflow").coverflow('index', 5);

It would be incredibly awesome to have an event that fires once the newly selected index has completed animating and is visible/in-scope. Right now, as far as I can tell, there isn't a way to do that without resorting to trying to use animateComplete which fires on each frame, and trying to calculate when you are at the new one. Hope that makes sense!

Cheers.

Weird display issue on init

Very strange issue. Sometimes, only the currently selected index cover will be shown after I init. Once I hover over it and move the mouse wheel, everything is fine, and the other covers appear. Doesn't happen all the time, maybe about half the time.

Any ideas? Thanks - and awesome plugin, btw!

Container height is calculated wrong sometimes

Hi,

I have noticed that the container's height calculation gives 0 when using images and no CSS height: 240px;.

I think it happens because images are loaded in async manner and their dimensions are not known at the time of the calculation. So one of the solutions is to set height in CSS.

There probably is a way to detect that we are using images and recalculate height when they are loaded?

Thank you.

doesn't work with jQuery 3.1.1?

if change the script to the up-to-date version it won't work, any method or function needed to be modfied to make it works?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.js"></script>

Swipe up and down disabled

Swiping up or down at the moment defaults to the same behavior as swipe right, decreasing the index, which could be a big inconvenience to the user.

Newbie question, how to call refresh method?

Hello,

I have a really newbie question. I am using the coverflow in my App and I am appending covers to the end and I want to call the refresh method but I don't seem to be able to do it.

I am calling:

$('#preview-coverflow').coverflow.refresh();

Please can you help me to write the correct command?

Thanks

Only one cover is show

Hi,

First very great plugin,

my issue is that the coverflow script only show one cover (but in the dom i see all my cover) only when i change the size of the screen manually that all the cover load.

somebody got the same issue ?

Thanks

z-index issue when using with a lightbox with Coverflow and Safari 9.01

I have tried a few lightbox scripts with coverflow and I am having an issue with the covers showing thru the opened lightbox image in Safari ( version 9.01). Seems ok in firefox and Chrome.
I have tried setting my lightbox image z-index to a much higher value than the cover with no luck.

confirm event doesn't pass the original element that was clicked

Hey,

I'm using coverlfow with a complex object for each cover (an image and a header), and I'd like to have different behavior when clicking on the header and the image.
I noticed that the confirm event passes two arguments - the event and the element. The event.target, however, doesn't contain the original element that was clicked, but the entire cover (the div with the 'current' class). Therefore - no way to differ the clicks on the header and on the image.

Any chance it is possible to pass also the originally clicked element?

Thank you,
Irit.

Dependencies

Hi,

Great plugin.

It would be great if you can please explain the role of the dependencies and document it a little.

For example, what jQuery UI features are needed if I would like to download a version from the website?

What are these:

  • markdown.converter.min.js
  • jquery.interpolate.js

Thank you for your help.

Mr Alexander

events start only on releasing the finger/mouse

nice plugin, but it only starts flowing accross the pics when releasing the mousebutton. i think there is a lot todo in event handling, so the plugin could know if it should flow as long the mouse is pressed or if it should stick with the next pic in the list.

Lack of destroy method and memory leak

Plugin makes subscription on window (keydown, resize) so it must have destroy method in order to unsubscribe. Lack of destroy method leads to memory leak.
It becomes a problem when this plugin is used in single page application, where no page reloads at all.

Slow on mobile

This coverflow is horribly slow on mobile / WebViews (Android & iOS). Are there any means to accelerate swipe performance?

Add bower.json

Hello, would it be possible to add bower.json for this project?

Coverflow error "offsetWidth" happens with less then 8 images.

I'll keep posted here.

Scenario: Use coverflow with less then 8 images result in this error. How can we bypass it ?

jquery-coverflow.js:278 Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
    at t.(anonymous function).(anonymous function)._frame (file:///C:/DEV/WIP/HTML5/Components/coverflow-master-reflection/scripts/jquery-coverflow.js:278:83)
    at t.(anonymous function).(anonymous function)._frame (https://code.jquery.com/ui/1.12.1/jquery-ui.min.js:6:4499)
    at t.(anonymous function).(anonymous function)._setIndex (file:///C:/DEV/WIP/HTML5/Components/coverflow-master-reflection/scripts/jquery-coverflow.js:235:10)
    at t.(anonymous function).(anonymous function)._setIndex (https://code.jquery.com/ui/1.12.1/jquery-ui.min.js:6:4499)
    at t.(anonymous function).(anonymous function)._create (file:///C:/DEV/WIP/HTML5/Components/coverflow-master-reflection/scripts/jquery-coverflow.js:194:9)
    at t.(anonymous function).(anonymous function)._create (https://code.jquery.com/ui/1.12.1/jquery-ui.min.js:6:4499)
    at t.(anonymous function).(anonymous function)._createWidget (https://code.jquery.com/ui/1.12.1/jquery-ui.min.js:6:6645)
    at new t.(anonymous function).(anonymous function) (https://code.jquery.com/ui/1.12.1/jquery-ui.min.js:6:4063)
    at HTMLDivElement.<anonymous> (jquery-ui.min.js:6)
    at Function.each (jquery-2.2.4.min.js:2)

For rendering server images atm we can use a loadScript to start coverflow at right time. Looking for ways to bypass that too.

for (let index = 0; index < data.length; index++) {
            $('#preview-coverflow').append("<img class='cover' src='" + data[index] + "' />");

            if (data.length - 1 === index) {
                loadScript("scripts/jquery-coverflow.js", createCoverflow);
            }
        }
/**
 *  Simple node.js style script loader for modern browsers
 **/
function loadScript(src, cb) {
    var script = document.createElement('script');
    script.async = true;
    script.src = src;
    script.onerror = function () {
        cb(new Error("Failed to load" + src));
    };

    script.onload = function () {
        cb();
    };

    document.getElementsByTagName("head")[0].appendChild(script);
}

maxHeight

Hello,
You wrote great plugin. Thanks.

I made small change for calculating maxHeight correctly (line 74):

maxHeight = Math.max.apply(null, covers.map(function(){
    return $(this).height();
}).get()),

Display a text in the current selected cover?

Hi,

Is there a way to display a text in the selected cover? following the demo, a text can be displayed below the cover, possible to display it on top of the cover photo? Thanks.

  select:       function(event, cover) {
              var img = jQuery(cover).children().andSelf().filter('img').last();
              jQuery('#photos-name').text(img.data('name') || 'unknown');
            }

coverflow _destroy incomplete :: includes fix

I have been using this for changing picture displays without reloading the page but just destroying coverflow, rebuilding the image list and reapplying coverflow. I saw the effect of reduced height on the outer coverflow-div some time cutting off images.
After extending the _destroy function with this one line everything works flawlessly.
" this.element.height(''); "

I haven't checked to see if anything else needs to be unset/removed on destroy, but so far everything works fine.
Love your function. Didn't want to fork for this simple fix.

Focus onload

Is it possible to focus the coverflow component on page load? Arrow keys do not seem to work unless I click on the component first.

Clicks do not work in Demo, Images disappear in Safari

In Firefox, Safari and Chrome on Mac 10.8.5, clicking on images does not move that image to focus, nothing happens, only moves with trackpad and arrow keys. On Safari, images disappear one by one as they are scrolled with the keyboard leaving just one showing at the end.

How to modify an individual option say index option after calling overflow?

$(function() {
if ($.fn.reflect) {
$('.coverflow .cover').reflect(); // only possible in very specific situations
}

    $('.coverflow').coverflow({
        index:          6,
        density:        2,
        innerOffset:    50,
        innerScale:     .7,
        animateStep:    function(event, cover, offset, isVisible, isMiddle, sin, cos) {
            if (isVisible) {
                if (isMiddle) {
                    $(cover).css({
                        'filter':           'none',
                        '-webkit-filter':   'none'
                    });
                } else {
                    var brightness  = 1 + Math.abs(sin),
                        contrast    = 1 - Math.abs(sin),
                        filter      = 'contrast('+contrast+') brightness('+brightness+')';
                    $(cover).css({
                        'filter':           filter,
                        '-webkit-filter':   filter
                    });
                }
            }
        }
    });
    $('.coverflow').coverflow({index:1});
});

I tried above code but still the selected index is 6.Please help me how to modify the individual options are declaration of coverflow call.

Autoplay

Is there / will there be a function to set a timer, to automatically skip to the next picture?

Coverflow only shows one cover div ?

I am using ionic, and my init code is basically :

                        $('.collection-repeat-container').coverflow({
                            easing: 'easeOutElastic',
                            duration: 'slow',
                            width: 300,
                            height: 600,
                            visible: 'density',
                            selectedCss: {
                                opacity: 1
                            },
                            outerCss: {
                                opacity: .1
                            },
                            confirm: function() {
                                console.log('confirm?');
                            },
                            change: function(event, cover) {
                                var img = $(cover).children().andSelf().filter('img').last();
                                $('#coverflow-title').text(img.data('name') || 'unknown');
                            }
                        });

but I only see one cover, if I scroll - it sort of "flips" left and right for others but you can only ever see one. How can I get it to show all covers in the background?

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.