Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Quick side-question:

I know metapost and tikz rather well and am searching for a JS library that does similar things using SVG, especially when it comes to path drawing.

Example: draw a curved path from the center of item A to the center of item B, but cut off at the bounding box of B and put an arrow head there. In metapost, thats easy (after grokking the syntax):

ndb2.c{right}..{curl0}dk.c cutafter BpathBox(dk);

Most JS libraries (including D3 and Raphael) make this pretty hard, as they rarely deal with shapes and intersections (beyond masking and clipping). D3 for example is awesome for graphs, but not if you want to put something on intersections with them :).

I found jointjs[1] and kind of like it, but is there anything else?

http://www.jointjs.com/demos/pn



Dan Lynch ported some of pstricks to js[1], which you might be interested in checking out. Don't know if you can do intersections and cuts though...

[1] https://github.com/pyramation/LaTeX2HTML5/blob/master/lib/ps... demo here http://latex2html5.com/


Hm, that is a nice start indeed, but as far as I can tell, intersections and cuts are not in :(. pstricks I forgot, I know that as well.

I am not that attached to the syntax, just the possibilities and some of the vocabulary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: