Fix indexOf check. Thanks for the heads up @jmccliment !
Adding a detection of the HTMLDocument for IE7/8 compatibility
Merge pull request #127 from dcabasson/master

Adding a detection of the HTMLDocument for IE7/8 compatibility
Adding grabbing class on canvas while draging

This allows changing the crusor while draging, e.g.

#infovisContainer-canvaswidget.grabbing {
cursor: -webkit-grab;
}

#infovisContainer-canvaswidget.grabbing {
cursor: -webkit-grabbing;
}

e.preventDefault() is needed for some browsers (e.g. webkit based) which
default operation of dragging is selection (hence the corsor shown).
Merge pull request #131 from shex/master

This allows changing the crusor while draging
Arrow position in different places

Usage:
arrowPosition param in Edge's Option. Enum values are 'end' (default)
and 'center'.

Edge: {
epsilon: 14,
color: '#fff',

arrowPosition: 'center'
}

Other positions can be added easily now:
e.g.
case 'start':  posVect = new Complex(to.x, to.y); break;

TODO: Allow percentages instead of enum value
Sorry for the big diff (damn window's ending).

The changes are:
RGraph.js:
'arrow': {
'render': function(adj, canvas) {
var from = adj.nodeFrom.pos.getc(true),
to = adj.nodeTo.pos.getc(true),
dim = adj.getData('dim'),
direction = adj.data.$direction,
inv = (direction && direction.length>1 && direction[0] !=
adj.nodeFrom.id),
arrowPosition = this.edge.arrowPosition || 'end';
this.edgeHelper.arrow.render(from, to, dim, inv, canvas, arrowPosition);
},

Helpers.js
'render': function(from, to, dim, swap, canvas, arrowPosition){
var ctx = canvas.getCtx();
// invert edge direction
if (swap) {
var tmp = from;
from = to;
to = tmp;
}
var vect = new Complex(to.x - from.x, to.y - from.y);
vect.$scale(dim / vect.norm());
var posVect;
switch (arrowPosition) {
case 'end':    posVect = vect; break;
case 'center': posVect = new Complex((to.x - from.x)/2, (to.y -
from.y)/2); break;
}
var intermediatePoint = new Complex(to.x - posVect.x, to.y - posVect.y),
normal = new Complex(-vect.y / 2, vect.x / 2),
endPoint = intermediatePoint.add(vect),
v1 = intermediatePoint.add(normal),
v2 = intermediatePoint.$add(normal.$scale(-1));
Arrow positioning
Trying to repair CRLF commits
Fixed bugs related to morphing with directed graphs (specifically in RGraph)

The bugs appear when morphing from Graph A to Graph B, where A!=B, i.e.,
Where Edges in A either do not apear in B or in the reveres direction.

All bugs stem from the fact that rGraph is actually not-directed, and
the edge has a data memeber which holds the directions. Much of the
traversal operations used for calculations did not introspect this field
(either for deletion of edges nor for their reversal)
Example of bugs fixed:
* A comprises 2 nodes (x,y), and we morph from x->y to y->x., and back
(checking several morphs is a must since another bug was since must
operation traverse each edge twice, from each node).

Note that example only covers one of the bugs fixed in this commit.
Test Morph on Directed Graphs

Testing morph operations on a directed Graph, where edges are change
direction.
The edges' direction should be taken into considered when traversing the
Graph I.E., the BFS search should NOT follow a removed edge or a
reveresed edges (one that changes direction in the morph).
Running the tests: for each example, load the example clicking the
'Load' button followed by clicking the 'Run' button.
Merge pull request #133 from shex/master

Bugs in RGraph's morph (directed graph), and a feature (positioning the arrow in middle of edge)
Avoid also edges at a mousedown event if the panning setting is 'avoid nodes' so that we can move an edge by dragging it.
Added check for existence of preventDefault.
Merge pull request #137 from stavarotti/master

Added check for existence of preventDefault()
Fixing nodeFx bug
Merge pull request #138 from KurtPreston/master

Fix nodeFx bug
Merge pull request #136 from shinaisan/master

Force Directed Graph:Edges cannot be dragged when Navigation is enabled
This fixes a 0/0 bug in IE8

The 0/0 results in NaN which other browser handle fine but IE8
and probably IE8- choke on.
Merge pull request #140 from siq/master

Fix for [issue 139](https://github.com/philogb/jit/issues/139)