Open kenlimmj opened 11 years ago
Oh, realized also that diagonal arrows are not supported. So if a track comes in at a straight diagonal (e.g. from 1,1 to 2,2), then have to straighten it out before applying the arrow
I'll fix the diagonal arrow thing soon, as by right if I make the joints round on the track you can force a diagonal in without making it look too ugly. Implementing that part on the GUI is a different story.
Just saw this repo JS:
https://github.com/bramp/js-sequence-diagrams/blob/master/src/sequence-diagram.js
It's basically a UML Diagram generator written in JS, but they've use Raphael for the graphics library. They draw arrowheads! Haven't gotten the chance to look at the code in detail, but from a cursory glance it looks like it'd be around line 403 onwards.
yup, but all their arrows are black, Raphael has a bug which turns all arrowheads into the last colour you feed into it. E.g. I draw a blue track, then I draw a red track, both with arrowheads, then blue track will have red arrowhead.
They're updating Raphael again though (finally), so hopefully in a short while it'll get fixed. The we can set arrowheads like they do, with Element.attr("arrow-head","round") or sth like that.
I'm rather interested in their arrangement methods too, maybe we can use something from it.
After changing blocksize and station radius, the connector radius has to be manually elucidated, and the arrow itself has to be scaled up or down separately when scaling the track size. Ideally these should all tag to blocksize.