30 Commits

Author SHA1 Message Date
Quincy Morgan
21a49bbec8 Initial support for D3 v6.2.0 2020-10-06 15:08:39 -04:00
Quincy Morgan
7920f269c0 Fix issue where node could not be dragged after long-clicking if something else was already selected (close #7826) 2020-09-03 09:57:55 -04:00
Quincy Morgan
64096cbc67 Handle pointercancel events in behaviorDrag 2020-05-28 14:21:22 -04:00
Quincy Morgan
0a7f05b4a5 Fix console error with dragging midpoints 2020-05-21 13:35:50 -04:00
Quincy Morgan
95f8e36a2a Add a small tolerance to node dragging so selecting them no longer requires zero movement (close #1981) 2020-05-19 17:24:47 -04:00
Quincy Morgan
e079e120bf Make behaviorDrag ignore non-active pointers (re: #6745) 2020-05-15 11:31:36 -04:00
Quincy Morgan
5195d8d95b Don't use d3_mouse and cache client rect values as needed (close #7489) 2020-03-28 16:32:38 -07:00
Quincy Morgan
f8f69a777a Replace inconsistently-supported dblclick events with custom handler on platforms supporting pointer events
Fix issue where double-tap-to-zoom would not be properly disabled when drawing on touch devices (close #2128)
Support adding nodes to ways with double-tap with on touch devices (close #2677)
Support double-tap-to-zoom with styluses on touch devices
Don't accept double click/tap events if the taps are far apart
Don't re-enter modeSelect when clicking the selected feature again
2020-03-06 12:46:26 -08:00
Quincy Morgan
83a51a4192 Use pointer events for node dragging and drawing (re: #5505)
Enable dragging nodes with touches and styluses (close #7415)
2020-03-05 15:18:39 -08:00
Bryan Housel
cd9203975d Use touch targets for notes, fix a few bugs with note dragging
(closes #5213)
2019-01-04 15:48:39 -05:00
Bryan Housel
152022aec4 Use context.keybinding for keybindings that don't change
(closes #5487)
2018-11-13 20:57:21 -05:00
Thomas Hervey
06a410107b cleaned up merge relics and comments 2018-07-20 23:31:49 -04:00
Thomas Hervey
a6bdbcabb2 merged from 2018-07-20 23:21:24 -04:00
Thomas Hervey
bf9b19359a WIP drag note 2018-07-20 21:41:44 -04:00
Thomas Hervey
24579b15bc WIP testing new drag_notes mode 2018-07-20 14:26:02 -04:00
Thomas Hervey
14212b47fe WIP: drag note 2018-07-19 15:21:46 -04:00
Bryan Housel
6881205d43 All touch targets are GeoJSON now
This makes the code a bit more consistent and lets us avoid some
hacky and probably non-performant things:
- abusing CSS classes in the draw/drag datum functions (classed `.target`)
  (is this thing target? just check d.properties)
- regexing the id for `-nope$`
  (is this thing a nope target? just check d.properties)
- using context.hasEntity to get a the real entity
  (is this thing a real osmEntity? just check d.properties)
- fixes code like the restriction editor which uses fake ids for split ways
2018-01-01 22:37:10 -05:00
Bryan Housel
fc680545ad Don't dispatch drag start and move together
Drag start is responsible for switching into drag mode, classing
stuff as `active` and kicking off a bunch of other things.

If the drag move happens immediately after this, and includes the
target from the initial active drag, it can cause weird snapping
from the dragnode to its own parent way.  (Happened if the user did
a very fast drag from the node along the parent way just next to it)
2017-12-22 13:58:27 -05:00
Bryan Housel
5a4faa84a1 Fixed some of the point/vertex/midpoint snapping issues
Still working on snapping to lines/areas, and making sure drawing lines/areas
will complete
2017-12-16 01:33:12 -05:00
Bryan Housel
75d2c45fd6 Convert lodah-es and d3 to named imports for behaviors 2017-09-24 21:43:54 -04:00
Bryan Housel
49c087d51f Rename delegate->selector, adjust formatting, drop userselect polyfill 2017-04-25 16:51:12 -04:00
Bryan Housel
f93e57b97d Use #map.node() for drag surface instead of svg #surface
This is because #surface can be transformed during a partial redraw
and d3.mouse() returns transformed point, not the real screen point.
a2cf4f32ec/src/point.js (L4-L9)
2017-01-29 17:11:55 -05:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Tom MacWright
947a1d9c1a Resolve lints 2016-09-03 19:08:03 -04:00
Tom MacWright
3af54610ca Refactor customEvent system to use d3.customEvent 2016-09-03 17:56:56 -04:00
Tom MacWright
202482519a Disable caching to save memory, fix event.of hack, remove console.log 2016-09-03 17:01:25 -04:00
Bryan Housel
a86f34b4ef Pacify eslint, get build and tests running again 2016-08-26 01:15:07 -04:00
Tom MacWright
cdb533fa84 Begin d3 v4 update 2016-08-21 15:19:27 -04:00
Kushan Joshi
0939983515 external modules for behavior 2016-06-22 12:34:43 +05:30
Kushan Joshi
14f0d95e94 modularize iD.behavior 2016-06-17 12:53:19 +05:30