Commit Graph

31 Commits

Author SHA1 Message Date
Saman Bemel-Benrud
1b495870c0 grammar for tooltips, keybinding hints, other tooltip fixes. 2013-01-30 19:09:10 -05:00
John Firebaugh
e4c513ae87 midpoint = true -> type = 'midpoint'
Makes it more consistent with entities.
2013-01-30 16:24:33 -05:00
John Firebaugh
363cd53af1 Rearrange code 2013-01-30 16:17:30 -05:00
John Firebaugh
168a3b5e26 Fix drawing on midpoints (fixes #559) 2013-01-30 16:14:29 -05:00
John Firebaugh
dbac370c71 More draw refactoring 2013-01-30 16:14:29 -05:00
John Firebaugh
e381b6ab26 Extract AddMidpoint action 2013-01-30 15:47:33 -05:00
John Firebaugh
459dc00ce5 Change the midpoint data a bit
Store the ways which share the segment and the index of
the segment. This will be used in both DragWay and Draw
behaviors.
2013-01-30 15:47:33 -05:00
Tom MacWright
699041019f Pan map when dragging to pad. Fixes #534 2013-01-29 17:02:56 -05:00
John Firebaugh
65baf36143 Remove unused DragWay behavior 2013-01-29 13:19:04 -05:00
John Firebaugh
b37ef978f4 Snap to ways/vertices/midpoints when drawing (#240)
Also add anti-snapping behavior when option key is down.
2013-01-29 11:16:12 -05:00
John Firebaugh
5d73e45b50 Fix exiting draw mode via other means (fixes #503) 2013-01-28 17:26:14 -05:00
Ansis Brammanis
d998b000d5 Fix midpoint dragging, break multiple touch drags 2013-01-28 17:02:07 -05:00
John Firebaugh
859ae1c1cc DrawWay#cancel shouldn't unconditionally delete the way
Fixes #514.
2013-01-28 16:39:31 -05:00
Ansis Brammanis
aa21e4b301 Undo cancels drags 2013-01-28 15:56:37 -05:00
Ansis Brammanis
2bd4fbe542 No draw mousemove events while mouse is down 2013-01-28 14:41:08 -05:00
Tom MacWright
9ccb99ee1b Fix reversal 2013-01-28 12:18:03 -05:00
Tom MacWright
50b997599d Fix shared-midpoint dragging. Fixes #432 2013-01-27 16:54:34 -05:00
John Firebaugh
e09666bbdc Fixing draw mode bugs
Disabling interactive draw undo for now. I know how to fix it
but it's a bit tricky. So undo will just drop you out to browse
mode for the time being.

Fixes #477.
Fixes #516.
2013-01-26 15:24:14 -05:00
John Firebaugh
50cfed4f3c Remove unused parameter
Follow up to deebe5.
2013-01-25 16:37:40 -05:00
John Firebaugh
5ea855e18d Replace Graph#fetch with Graph#childNodes
Having two kinds of Ways (fetched and non-fetched)
introduced some accidental complexity. This brings things
more in line with how parentWays/parentRelations work.

Fixes #73.
2013-01-25 15:10:44 -05:00
John Firebaugh
0fef1a8cfd Drop -> undo 2013-01-24 18:14:40 -05:00
John Firebaugh
dd03544a00 Extract AddWay behavior 2013-01-24 18:04:40 -05:00
John Firebaugh
18c7267010 Extract Draw behavior
Fixed some bugs but introduced others.
2013-01-24 17:00:48 -05:00
Ansis Brammanis
91a709685c draw_way only applies to currently selected way 2013-01-15 13:12:05 -05:00
John Firebaugh
7dc1945ee3 accuracy-handle -> midpoint 2013-01-11 14:54:51 -08:00
John Firebaugh
2d3ce6c125 Extract hover behavior 2013-01-07 08:34:37 -08:00
Tom MacWright
aca0098ea0 Use 2d transforms and fix jshint problems 2013-01-02 13:01:18 -05:00
John Firebaugh
c927ff5b5d Rationalize vocabulary
- nodes
  - vertices
  - points
- ways
  - lines
  - areas
2012-12-29 09:18:05 -08:00
John Firebaugh
f0acbc2653 loc -> point, dxdy -> delta 2012-12-21 12:10:44 -08:00
John Firebaugh
2c8bbd8985 Integrate new drag behaviors 2012-12-21 12:10:44 -08:00
John Firebaugh
2c40de62be Add iD.behavior.drag
`iD.behavior.drag` is like `d3.behavior.drag`, with the following differences:

* The `origin` function is expected to return an [x, y] tuple rather than an
  {x, y} object.
* The events are `start`, `move`, and `end`.
  (https://github.com/mbostock/d3/issues/563)
* The `start` event is not dispatched until the first cursor movement occurs.
  (https://github.com/mbostock/d3/pull/368)
* The `move` event has a `loc` and `dxdy` [x, y] tuple properties rather
  than `x`, `y`, `dx`, and `dy` properties.
* The `end` event is not dispatched if no movement occurs.
* An `off` function is available that unbinds the drag's internal event handlers.
* Delegation is supported via the `delegate` function.
2012-12-21 12:10:43 -08:00