Commit Graph

18 Commits

Author SHA1 Message Date
Christian Schwarz
be68027189 Fixed chrome selection bug (fixes #2151) 2014-07-15 14:43:08 +02:00
John Firebaugh
1e78ee5c87 Stricter jshint 2013-10-24 16:08:48 -07:00
John Firebaugh
8323c948a7 jshint fixes 2013-10-24 15:33:52 -07:00
John Firebaugh
0a3d2161cd Fix corner case that could cause getting stuck in drag mode (#1910) 2013-10-23 16:44:35 -07:00
John Firebaugh
a039f576e9 Port user-select suppression to iD.behavior.Drag
Fixes #1585
2013-06-20 15:18:50 -07:00
John Firebaugh
0724e204e8 Don't preventDefault on mousedown events
This prevents focus/blur events from getting dispatched,
which was the root cause of #1295.

Fixes #1295.
2013-05-31 14:27:37 -07:00
John Firebaugh
271ddace64 Revert "prevent accidental drags"
Not sure this helps a whole lot, and it requires a mousemove listener.

This reverts commit b7760e8747.
2013-05-14 09:33:27 -07:00
John Firebaugh
2d62a78ac9 Semicolons 2013-04-23 14:31:24 -07:00
Ansis Brammanis
b7760e8747 prevent accidental drags 2013-03-18 20:56:29 -04:00
Ansis Brammanis
2062fe9a67 Don't end drag when parent removed 2013-02-12 11:29:21 -05:00
John Firebaugh
1298fe195d Remove keybinding coupling from iD.behavior.drag 2013-02-11 11:24:05 -08:00
Tom MacWright
67632d638f Soft clicking. Feels pretty nice. Refs #530 2013-02-05 15:27:02 -05:00
Ansis Brammanis
d998b000d5 Fix midpoint dragging, break multiple touch drags 2013-01-28 17:02:07 -05:00
Ansis Brammanis
aa21e4b301 Undo cancels drags 2013-01-28 15:56:37 -05:00
Ansis Brammanis
91a709685c draw_way only applies to currently selected way 2013-01-15 13:12:05 -05:00
Tom MacWright
aca0098ea0 Use 2d transforms and fix jshint problems 2013-01-02 13:01:18 -05:00
John Firebaugh
f0acbc2653 loc -> point, dxdy -> delta 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