Commit Graph

25 Commits

Author SHA1 Message Date
Bryan Housel
2f6004fcfa performance tuning work-in-progress
* 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
2014-11-05 00:27:14 -05:00
Bryan Housel
dcc9812986 prevent most operations on things connected to hidden features.. 2014-10-28 21:37:02 -04:00
John Firebaugh
1e78ee5c87 Stricter jshint 2013-10-24 16:08:48 -07:00
John Firebaugh
7e94473e23 Add additional check to prevent snapping to area fills (fixes #1887) 2013-10-14 15:52:32 -04:00
John Firebaugh
75b6ec746b Clean up 2013-09-29 07:55:59 -07:00
John Firebaugh
bba761d8ea size -> dimensions
D3 3.2 adds selection.size, where size means "number
of selected elements".
2013-06-20 13:05:20 -07:00
John Firebaugh
98072bdd27 Use minzoom behavior in all appropriate modes
Fixes https://github.com/systemed/iD/issues/1599#issuecomment-19568483
2013-06-17 14:43:16 -07:00
John Firebaugh
c68635062c Fix sidebar UI behaviors
* Restore preset search autofocus (fixes #1566)
* Should show hover in draw modes, not preset list
2013-06-03 16:28:30 -07:00
John Firebaugh
a84a3364cc selection -> selectedIDs
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
a97e61803c Refine selection behavior when dragging a node
* Preserve the sidebar state (fixes #1401)
* Show vertices of selected way (fixes #1478)
* Reselect exact previous selection when finished
2013-05-29 10:32:11 -07:00
John Firebaugh
884d2d0732 Add hover indicator in sidebar 2013-05-26 14:07:10 -07:00
John Firebaugh
1455c5e551 Use entity ID selectors in more places 2013-05-13 12:29:29 -07:00
John Firebaugh
07fb94fee2 Fix node dragging 2013-05-13 12:27:20 -07:00
John Firebaugh
1641f38632 Use context.mouse() 2013-05-09 21:55:05 -07:00
John Firebaugh
08949d2fe9 Redo iD.geo.chooseIndex
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.
2013-05-07 18:35:45 -07:00
Ansis Brammanis
56eb281c4b fix node dragging 2013-05-02 13:31:57 -04:00
John Firebaugh
3bdaab0bb3 Fix dragging a node to another node 2013-04-26 12:28:25 -07:00
John Firebaugh
24ecf2a697 Don't show radial menu after dragging node (fixes #1385) 2013-04-26 11:45:01 -07:00
Ansis Brammanis
01238a49db select parentway(s) after dragging node
fixes #1368
2013-04-23 21:10:15 -04:00
Tom MacWright
1e5a0fc4a7 Stop nudging when users drag outside of the window. Fixes #1326 2013-04-18 18:31:34 -04:00
Ansis Brammanis
acdc1b3824 add nodes to all of a segment's ways
when
- dragging a node to a way
- starting a line from a way
- starting an area from a way
- drawing a way
2013-04-04 17:58:53 -04:00
John Firebaugh
5d30a01cfc Fix event namespace 2013-03-26 11:09:35 -07:00
John Firebaugh
4fa88acc85 Fix connecting adjacent vertices
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.
2013-03-12 16:26:40 -07:00
Ansis Brammanis
917d5bfaeb avoid history change when dragging midpoint
dragging a midpoint onto an adjacent node
should do nothing
2013-03-12 14:38:01 -04:00
John Firebaugh
9f5ba8342d Convert DragNode to a mode
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.
2013-03-11 15:45:27 -07:00