Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo - display issues in smaller screens #9

Open
drfragment opened this issue Oct 15, 2014 · 1 comment
Open

Demo - display issues in smaller screens #9

drfragment opened this issue Oct 15, 2014 · 1 comment

Comments

@drfragment
Copy link

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.

@ykyuen
Copy link

ykyuen commented Apr 22, 2016

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants