* store entity's matched features in a graph transient
* replace fn calls to get commonly used _keys and _hidden arrays
* replace lodash calls with faster for loops (in some places)
* always pass graph/resolver as a param
It now calculates proper orthogonal projections and finds
the minimal one. Rename it iD.geo.chooseEdge and minimize
its coupling to context.
This version also copes with 0- and 1-node ways.
Fixes#1428.
Can't unconditionally delete the node; it may be a member
of other ways.
I didn't preserve the behavior of dragging a midpoint to
an adjacent node being a no-op. In general we don't try to
eliminate compound operations whose net result is a no-op;
I don't think it's important to do so for this special case.
The degenerate case of connecting the endpoints of a two-vertex
line now results in a point. This is what naturally resulted
from the code, and seems ok.
Fixes#983.
This makes the CSS more consistent and makes fixing #953
easier. Also, dragging now clears the selection and closes
any operations menu, which is good.
There's still a minor Chrome bug: it doesn't refresh the
cursor when the .behavior-hover class is removed.