jquery-final-countdown icon indicating copy to clipboard operation
jquery-final-countdown copied to clipboard

Demo - display issues in smaller screens

Open drfragment opened this issue 10 years ago • 1 comments

Content gets cut and bottom white spaces appears when you resize your browser to a point when vertical scrollbar appears. Or if you open it with a phone or tablet.

drfragment avatar Oct 15 '14 10:10 drfragment

This is becoz the canvas keep using the initial circle width for redrawing the circle on resize. Add the redrawCircles function and replace the updateCircles by this new function in responsive().

function responsive() {
    $(window).load(updateCircles);

    $(window).on('redraw', function() {
        switched = false;
        updateCircles();
    });

    // Instead of update the circle directly,
    // call redrawCircle to get the updated width before drawing
    // $(window).on('resize', updateCircles);
    $(window).on('resize', redrawCircles);
}

function redrawCircles() {
    prepareCounters();
    updateCircles();
}

ykyuen avatar Apr 22 '16 17:04 ykyuen