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

Remove Pings or redraw canvas? #21

Open
eforblue opened this issue Apr 24, 2017 · 1 comment
Open

Remove Pings or redraw canvas? #21

eforblue opened this issue Apr 24, 2017 · 1 comment

Comments

@eforblue
Copy link

Is there a method to remove any or all the pings? Or is there a method to redraw the canvas and reset everything including removing all the pings?

@perskes
Copy link

perskes commented Mar 10, 2018

I'm not quite sure if I understand what you mean, but wrapping the whole planetary js in a function and setting a variable would probably be your best chance.

function forCreatingThePlanet(pingsEnabled){
...
var planet = planetaryjs.planet();
....
if(pingsEnabled == true){
setInterval(function() {
planet.plugins.pings.add(15.421371, 47.076668, {
color: "red",
ttl: 1000,
angle: 10
});
};
}
...
}

And then you call it forCreatingThePlanet(false) and this will "restart" your planet and this time without pings.

By the way I see your question is old, so it will probably not matter anymore.
I'm really sad this project is not active, I wanted to use it, but it lacks a couple of features.

It's hard to write them yourself without any knowledge of d3.js or the core of this library.

Do you know if this is actively developed somewhere?

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