Commit Graph

53 Commits

Author SHA1 Message Date
Quincy Morgan a58abe3c6f Move localStorage interface from a property of coreContext to a corePreferences function 2020-04-01 11:00:48 -07: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 4a67e8c5dc Remove delay in opening the edit menu
Don't show the edit menu for multiple selected relations
Streamline edit menu code, replacing the confusing "suppressMenu" system
2020-03-26 12:48:30 -07:00
Quincy Morgan 62607e1e1d Fix issue where edit menu could not be opened by right-clicking on already selected feature 2020-03-25 16:10:24 -07:00
Quincy Morgan eed7944a1a Replace various uses of d3_select and d3_selectAll with selection on the container 2020-03-22 12:34:06 -07:00
Quincy Morgan 5fd25601fe Convert map surface and supersurface from ids to classes 2020-03-21 13:41:06 -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 83d2656bbc Fix responsiveness issue when selecting features on iPad
Implement an alternative solution for #6028 that doesn't rely on timeouts
2020-03-04 13:10:15 -08:00
Quincy Morgan c41e0b9937 Use pointer events for hovering and selecting data on supported platforms (re: #5505)
Fix issue where Apple Pencil stylus could not select map data (close #7396)
Fix issue where features could not be selected in a single tap on iPad (close #7380)
2020-03-04 12:18:43 -08:00
SilentSpike 51efd5b714 Update and standardise QA implementations
- ES6ify (now using class syntax to define QAItem objects)
- Fix bug with KeepRight marker rendering not updating properly
- Use `qa-` prefix for the UI element classes to differentiate from iD
validation error related UI element classes
- Move away from "error" where possible in source
- Move away from snake_case naming where possible

Note that some function/method names have been untouched to make life
easier for v3 development. Have added note comments where appropriate.
2020-02-06 23:07:50 +00:00
Bryan Housel 37557a7c98 Defer processing clicks in behaviorSelect
(closes #6028) (I hope?)

Because this click may trigger a blur event,
and the blur event may trigger a tag change,
and we really want that tag change to go to the already selected entity
and not the one that we are about to select with the click  #6028, #5878

(Be very careful entering modeSelect anywhere that might also blur a field!)
2019-05-01 14:47:29 -04:00
Bryan Housel d3f767d6f4 Code cleanups, prefix state variables with _ 2019-05-01 13:48:36 -04:00
Quincy Morgan d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel 1ce4f0ad6a Remove lodash without
(re: #6087)
2019-03-25 21:56:54 -04:00
SilentSpike 781558e56b Remove redundant source property 2019-02-04 18:40:06 +00:00
SilentSpike 3ed13e9a4a Convert KeepRight to use generic error type 2019-02-04 16:54:07 +00:00
SilentSpike 20ed8b50c9 Add generic QA error
I've converted the improveOSM errors to use this new generic QA error
structure which should allow for more general code to be used in
behaviour and UI.

Sidebar preview is currently broken, but will be fixed shortly.
2019-02-04 16:53:59 +00:00
SilentSpike ee5f9f3bf2 Use consistent short service name 2019-02-01 22:51:02 +00:00
SilentSpike 214cf41019 Use more generic classes for errors 2019-02-01 22:50:57 +00:00
SilentSpike 4f2646d567 Add basic title + description UI 2019-02-01 22:50:54 +00:00
Thomas Hervey 31f35b0389 added basics to sidebar 2018-12-19 13:35:26 -05:00
Bryan Housel 152022aec4 Use context.keybinding for keybindings that don't change
(closes #5487)
2018-11-13 20:57:21 -05:00
Bryan Housel cc938698e8 Add ability to select custom data 2018-08-25 11:14:04 -04:00
Thomas Hervey 73ee5c2fc9 fixed select_note mode, cleaned note_editor, TODO: enable note save 2018-07-03 22:45:51 -04:00
Bryan Housel bf499d9438 Restore modeSelect, and make a new modeSelectNote just for the notes 2018-07-03 18:11:59 -04:00
Bryan Housel b14d1b5061 resolve conflicts, fix a few minor bugs prob caused by merging:
- don't insert multiple times into the rtree in `services/osm.js`
- use `d.id` instead of `d.key` as the key in `svg/notes.js`
2018-07-03 16:40:07 -04:00
Thomas Hervey 8121f585d5 added checks for multiclick and click on notes 2018-07-03 15:39:22 -04:00
Thomas Hervey 2c22fe00a2 updated: hacky note hovering; todo: complete note click handling 2018-07-02 10:44:47 -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 96afbbd785 Refactor vector math functions from geo.js to vector.js 2017-12-28 01:08:11 -05:00
Bryan Housel f58349864c Add support for nope targets, line sub-segment targeting 2017-12-20 13:52:16 -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 ff14dbf944 Allow contextmenu events to work on the sidebar
(closes #4036)
2017-05-12 14:39:41 +01:00
Bryan Housel 0c810aebe4 Fix menu key as right click replacement on Windows
(closes #4017)
2017-05-08 22:03:05 +01:00
Bryan Housel 8989aea023 Clicking a midpoint should be treated as a click on the parent way 2017-04-14 00:38:04 -04:00
Bryan Housel d949fe08cb Fix faulty datum test from 681ee5a 2017-03-22 16:01:14 -04:00
Bryan Housel 681ee5a89a Prevent crash when missing datum
(This can happen if the user mouseups on a tooltip, e.g. in walkthrough)
2017-03-22 10:27:15 -04:00
Bryan Housel f291b0a120 Remove ineffective attempt to grab focus 2017-02-22 22:32:19 -05:00
Bryan Housel dc2318ab63 Add mention of the right-click menu in the walkthrough 2017-02-22 17:31:08 -05:00
Bryan Housel f7c3de9545 Preserve backward compability with radial menu
Old menu behavior can be restored with 2 cookies:
- `edit-menu-style=radial` - Display menu as a radial menu, limited to 8 items
- `edit-menu-show-always=1` - Show menu on all clicks, not just contextmenu/right
2017-02-22 16:50:42 -05:00
Bryan Housel 4f8d772397 More improvements to select behavior re contextmenu, shiftclick, etc. 2017-02-21 22:16:17 -05:00
Bryan Housel e756520bd8 suppressMenu(true) is now the default 2017-02-21 15:47:22 -05:00
Kushan Joshi 07de6d975f Fix right clicking edge cases
Fixed

- On reselecting multiple entities, right click doesn’t discard selection

- On selecting new entity, right click discards previous selection
- Preserved shift selection for both left & right click
2017-02-09 15:41:19 +05:30
Kushan Joshi 5b92b90ced Add context menu 2017-02-09 12:53:10 +05:30
popov 19b0a771f6 make vertex by midpoint double-clicking 2016-12-28 15:32:47 +10:00
Bryan Housel 07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel 3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -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
Tom MacWright 604d1e2719 import lodash (#3257) 2016-07-19 12:04:16 -04:00