ulfaslak / network_styling_with_d3

(1) Input a network. (2) Style it. (3) Download the result.
MIT License
28 stars 7 forks source link

added POST feature and did some error fixing #11

Closed benmaier closed 5 years ago

benmaier commented 5 years ago

I've added functionality to use an HTTP request (POST) to transfer the computed styling back to Python.

I've also declared some previously undeclared variables which used to caused errors on my machine.

ulfaslak commented 5 years ago

Styling as in the config? Or the image? Would be aaaaawesome if we could pipe the canvas image back into a notebook as cell output

ulfaslak commented 5 years ago

Ah just saw the issue on netwulf I understand now.

benmaier commented 5 years ago

Would be cool to pipe the image back ... I think I know how to approach this in general, but it'd take some time :(

ulfaslak commented 5 years ago

Is there a way for the program to tell if it was launched from a Python instance? Since I still want there to be a web version (because I use that quite a lot), this should of course not have the POST feature.

benmaier commented 5 years ago

We could add an option to the url, like ?python=true or smth?

ulfaslak commented 5 years ago

Good idea! Seems like location.href is what I was looking for. I will implement this.