uclnlp / egal

easy drawing in jupyter
Apache License 2.0
258 stars 21 forks source link

Arrowhead styles and nodes for connectors #2

Open Alexanderallenbrown opened 7 years ago

Alexanderallenbrown commented 7 years ago

Hi,

First of all, I am in love with this project! The lack of an easy way to get quick diagrams into notebooks has been the major hurdle for using them in class. I'm wondering how easy it would be to add functionality for adjusting both the arrowhead style/weight and the number of nodes on shapes so that connecting arrows don't "clump" in only a few spots (on circular connectors in particular).

ETA: I'm happy to take a stab at this, but no promises.

riedelcastro commented 6 years ago

Hi Alex,

sorry for the slow reply. I am now in teaching mode again and might find some cycles to improve this. Did you have a stab at it?

It shouldn't be too hard to increase the number of connectors. Making this adjustable is a little more tricky, primarily because it requires more user interface components---which I am terrible at! This is the same for arrowhead style/weight. I could point you to the code to change though if you have cycles. The codebase is a big mess because I just wanted to get this to work, and I am terrible at javascript. So you might need some guidance. Let me know.

Alexanderallenbrown commented 6 years ago

Hi Sebastian,

I too am in teaching mode— beyond the freehand drawing patch I made for my forked version, i wasn’t able to put time into anything else. I’m also pretty bad at both user interfaces and javascript, but I’d be happy to give this a shot, maybe over the holidays.

riedelcastro commented 6 years ago

Haha, actually, I just added a freehand drawing feature as well. I bought this £50 wacom tablet to draw on during the class, but also in preperation. In combination, this seems quite useful.

Alexanderallenbrown commented 6 years ago

Awesome. I’ll have to look at yours. Mine was for the same reason… it works great with a mouse, but when I try to use it with the Wacom tablet I use for teaching, it only works the first time the active stylus is detected, even though I used “touch” events as well as mouse events.