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

app.empty() not removing all plots [Firefox for Mac 16.0.1] #52

Open
AstDerek opened this issue Oct 24, 2012 · 0 comments
Open

app.empty() not removing all plots [Firefox for Mac 16.0.1] #52

AstDerek opened this issue Oct 24, 2012 · 0 comments

Comments

@AstDerek
Copy link

Seems this loop has some problems to remove all the graphs:

for(var i=0;i<graphs.length;i++){
    app.ui.colors.free.push(graphs[i].color);
    graphs.splice(i,1);
}

This change works fine:

for (n in graphs){
    app.ui.colors.free.push(graphs[n].color);
}

graphs = {};

P.S.: change above fails, this one seems good though

for(n=0;n<graphs.length;n++){
    app.ui.colors.free.push(graphs[n].color);
}
graphs = [];
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

1 participant