Commit Graph

284 Commits

Author SHA1 Message Date
John Firebaugh
d238e4eaeb Convert Tail to a behavior
This avoids an extra mousemove listener in base modes.
2013-05-14 17:51:24 -07:00
John Firebaugh
5b69387ea0 Fix unknown entity error on delete 2013-05-14 17:23:06 -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
bb487ba0ee Use fastMouse 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
John Firebaugh
e5dd800aff Allow selecting a relation 2013-04-26 11:34:24 -07:00
Ansis Brammanis
4e305ea773 don't permalink negative IDs (fixes #1374) 2013-04-25 11:16:56 -04:00
John Firebaugh
965cfc65e8 Show vertices of way being drawn (fixes #1367) 2013-04-24 10:24:35 -07:00
John Firebaugh
c50c3121d8 Make Graph#entity strict
Use Graph#hasEntity for the previous behavior.
2013-04-24 09:27:37 -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
John Firebaugh
cf60d344f1 Fix AddPoint's use of Select mode 2013-04-12 11:26:03 -04:00
John Firebaugh
71dda769f2 FF can't focus an SVG element 2013-04-12 11:24:25 -04:00
John Firebaugh
5dda54ea52 Refine focus behavior for inspector (fixes #1277)
Auto-focus the search field only right after finishing drawing.
At that point, the radial menu isn't shown anyway. So then the
flow for correcting geometry before assigning a preset is:

 1. Draw.
 2. Finish drawing. The search field is focused, and no
    radial menu is open.
 3. Click again to reselect the feature and show menu.
    Now the search field is blurred.

In other words: when the menu is shown, search should not be
focused. When search is focused, the menu should not be shown.
2013-04-12 10:08:44 -04:00
Ansis Brammanis
a8cf59e21c simplify 2013-04-05 13:31:08 -04:00
Ansis Brammanis
d7cc24b935 shadows for multipolygons 2013-04-05 12:11:23 -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
Ansis Brammanis
3ad94406cb fix multi-select regression 2013-04-02 16:54:08 -04:00
Ansis Brammanis
a4d7b20027 Don't try to select non-multipolygon relations 2013-04-02 16:23:40 -04:00
Ansis Brammanis
d573d42ebe Revert "don't try to select relations"
This reverts commit 5c15a180a3.
2013-04-02 16:00:39 -04:00
Ansis Brammanis
5c15a180a3 don't try to select relations 2013-04-02 15:42:35 -04:00
Ansis Brammanis
0c5424aa3f re-add 'selected' class after each redraw
Performance seems to be fine, but we could move this into
svg/* and only run it on entering elements.

fix #1236
2013-04-02 13:51:32 -04:00
John Firebaugh
b1daf85cfd Tooltips for disabled operations (fixes #573) 2013-03-29 12:29:07 -07:00
Ansis Brammanis
4a2cb9841d fix nudging during move operation 2013-03-28 15:03:31 -04:00
John Firebaugh
5d30a01cfc Fix event namespace 2013-03-26 11:09:35 -07:00
Ansis Brammanis
63edc30922 Revert "Use a temporary area tag for drawing. Fixes #1014"
This reverts commit 4184b503f9.
2013-03-18 14:02:21 -04:00
John Firebaugh
0c2957ca1b Decrement mode keybindings (fixes #1073) 2013-03-18 10:23:43 -07:00
John Firebaugh
fdcb96e8d6 Move more inspector logic to Inspector 2013-03-17 20:07:44 -07:00
John Firebaugh
13b5cc4c4d Move inspector logic to Inspector 2013-03-17 19:54:47 -07:00
John Firebaugh
cb12b184c0 Pass entity explicitly 2013-03-17 19:38:38 -07:00
Tom MacWright
4184b503f9 Use a temporary area tag for drawing. Fixes #1014 2013-03-15 18:27:06 -04:00
Tom MacWright
4b68f8f7ef Refactor preset grid, add fancier transition for inspector enter 2013-03-15 15:28:32 -04:00
John Firebaugh
66e1bdb47d Show tag editor for untagged entities that aren't new
Fixes #991.
2013-03-14 15:59:56 -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
Ansis Brammanis
8406b7de80 use capture for esc in select mode
so that the mode can be escaped even if
a text input is focused
2013-03-10 21:27:49 -04:00
John Firebaugh
988bfeb767 Support both delete and backspace (fixes #887)
Also show correct key in operation tooltip.
2013-03-04 17:12:44 -08:00
Ansis Brammanis
44079759a6 untie showing grid and showing radial menu 2013-03-04 00:42:02 -05:00
John Firebaugh
b09bc8cfa2 Extract selection reference 2013-03-01 10:30:12 -08:00
John Firebaugh
8b5b13fbc4 Delete commented out code 2013-03-01 10:30:12 -08:00
John Firebaugh
1f28e1441e Camel case identifiers 2013-03-01 10:30:12 -08:00
Ansis Brammanis
40e133c130 Tagless entities trigger initial 2013-02-28 19:30:48 -05:00
John Firebaugh
c02531fe21 Put presetData in context 2013-02-28 16:05:04 -08:00
Ansis Brammanis
e0bc3bf7e1 No initial mode after rotating 2013-02-28 13:21:18 -05:00