lines is derived from raphael.js' graffle.js. What lines does is set the style of the element with the ID of "lines" to be absolutely positioned and with a z-index of -1, creating a raphael generated svg layer behind your front-end layout. In that svg layer, a line is drawn between two selected element. It works by calling the lines function. The following is a example:
in your html
<div id="lines"> </div>
in your javascript
var boxOne = Y.one('#box1');
var boxTwo = Y.one('#box2');
lines(boxOne, boxTwo);
Raphael.js | 1.4.7 |
YUI | 3.x |
- Fix any issues.
- Create a branch for the jQuery masses.
- Add more arugments to the lines function to allow specification of which side the line connects to.
- Online example with dragging and spawning lined elements.
- Create node.js module branch with YUI.node and/or jQuery.node.
- Determine if using raphael.js is nessesary for lines and if not, replace it with pure svg.
- Further field testing & feedback.