Skip to content

Suggestion: autoRemove don't remove, just stops. #3

@hgc2002

Description

@hgc2002

autoRemove does more than just removing. It does the internal timer cleaning. But what about doing the cleaning but letting the bar visible (i.e. do not remove it),.

I did this very simple: add a property like justStop, set it as true and add this code:

function remove(callback) {
    window.clearInterval(intervals['backgroundAnimation']);

    //hgc 1-oct-2015
    //this way the bar will stay but animation will stop consuming resources.
    if (config.justStop) return;

    var renderedProgressBar = document.getElementById(config.id);
    renderedProgressBar.parentNode.removeChild(renderedProgressBar);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions