Commit Graph

47 Commits

Author SHA1 Message Date
Quincy Morgan 2264e4a6d7 Fix code tests 2020-05-28 11:45:49 -04:00
Quincy Morgan 79ceb96758 Fix several regressions to behaviorHover introduced in 38db23fab5 2020-05-28 11:33:47 -04:00
Quincy Morgan 38db23fab5 Extend behaviorHover to support multiple pointers 2020-05-27 15:07:23 -04:00
Quincy Morgan 60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07: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
Quincy Morgan b828ada0e2 Don't allow adding point-only features as vertices 2019-03-04 17:04:35 -05:00
Quincy Morgan 5262358d81 Fix an issue where added nodes would highlight momentarily while drawing an area 2019-02-26 09:34:45 -05:00
Quincy Morgan ced652806b Fix an issue where some tagged nodes or existing vertices could not be snapped to (close #5942) 2019-02-25 08:54:30 -05:00
Quincy Morgan 0b86be7bcb Fix bug where highlight would not appear on the first target node when continuing drawing a way 2019-02-15 11:56:31 -05:00
Quincy Morgan 96a1ec92c7 Fix prior commit
Apply same node snap suppression behavior to dragging vertices as to drawing ways
2019-02-15 10:28:43 -05:00
Quincy Morgan 55c10d2183 Only check to suppress vertex-snap highlighting for nodes (re: #5875) 2019-02-15 09:09:35 -05:00
Bryan Housel 6e45796be7 Merge pull request #5875 from openstreetmap/dont-snap-non-vertices
Dont snap to non-vertices
2019-02-10 22:13:09 -05: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
Max Grossman 58e31bc45a initial update to draw modes and hover behavior
ref #5811
2019-02-01 17:34:40 -05:00
Bryan Housel fadd8e2e8a Switch KeepRight markers to use touch targets
This makes it easier to select the KeepRight issue and avoid selecting
the OSM geometry underneath them
2019-01-04 21:17:38 -05: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
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 bb30cbf555 Move lib/d3.keybinding.js -> util/keybinding.js
almost none of the original d3 "plugin" code remains
2018-11-13 13:42:09 -05:00
Bryan Housel 0a82ab125e Add uiDataEditor for inspecting custom map data 2018-08-25 10:10:04 -04:00
Bryan Housel a9aca707b6 Support hovering on data features 2018-08-25 00:04:52 -04:00
Thomas Hervey 2c22fe00a2 updated: hacky note hovering; todo: complete note click handling 2018-07-02 10:44:47 -04:00
Thomas Hervey 737ccfcfba updated: siebar displays note details on hover (via svg) 2018-06-29 14:43:01 -04:00
Bryan Housel ddaa828ec9 Handle both target GeoJSON and osmEntity in hover
(fixes test and allows hover on the area fills again)
2018-01-01 22:53:40 -05: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 f58349864c Add support for nope targets, line sub-segment targeting 2017-12-20 13:52:16 -05:00
Bryan Housel ba5b3eee9c More work on vertex drawing, add debug for touch targets 2017-12-15 00:26:37 -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 4ee5d7334b Fix spacebar drawing and hover in Firefox - don't match active node
(closes #4016)
2017-05-08 01:37:38 -04:00
Bryan Housel 5ca4246a6d If drawing a way, don't hover on a node that was just placed
(closes #3974)
2017-04-26 13:33:21 -04:00
Bryan Housel 149cbbe350 Fix hover tests 2017-04-24 10:05:02 -04:00
Bryan Housel 6de6056c66 Don't hover sidebar or vertices when alt key disables snapping
This makes it a little more clear that the alt key is doing its job
2017-04-23 11:11:16 -04:00
Bryan Housel 98d484fc1f Restore hover behavior to restrictions editor, add breathe behavior
The issue was: now that selections are immutable you can't add behaviors
to them unless they are already entered.  i.e. the surface selection in
enter does not end up being the real surface after merging to update.
2016-10-30 11:35:36 -04: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 ab1b5ad39c Fix hover behavior 2016-09-24 00:55:35 -04:00
Tom MacWright ed135ce9ef Enable lib tests 2016-09-05 10:22:45 -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