339 Commits

Author SHA1 Message Date
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
5d779f2fc5 WIP: readded missing vars 2018-07-20 12:56:36 -04:00
Thomas Hervey
18def6e576 fixed accidental deletion move function 2018-07-20 12:10:50 -04:00
Thomas Hervey
1edd9ae92f WIP: added incomplete move note action 2018-07-20 12:08:26 -04:00
Thomas Hervey
42e24c13d9 WIP drag note 2018-07-19 18:34:15 -04:00
Thomas Hervey
14212b47fe WIP: drag note 2018-07-19 15:21:46 -04:00
Thomas Hervey
438756103d update checking if note is new 2018-07-18 17:11:17 -04:00
Thomas Hervey
87615c56c4 deselect selected notes on mode exit 2018-07-18 10:16:39 -04:00
Thomas Hervey
b017616993 added new note icon and completed sidebar 2018-07-18 09:38:59 -04:00
Thomas Hervey
af2b67663b added new-note button 2018-07-17 11:35:27 -04:00
Bryan Housel
57da729837 Implement note save button code 2018-07-12 23:50:29 -04:00
Bryan Housel
91add0c33e WIP on buttons, simplify, remove some event dispatch
- I made the buttons work like GitHub comment-on-issue buttons
before typing:  "Close Note" / "Comment" (disabled)
after typing:   "Close and Comment" / "Comment" (enabled)

- I removed a bunch of the event dispatches.  These are useful for sending
events to listeners/observers outside of the module.  In this case I think
we can handle most of the things from within the uiNoteEditor.  We can still
dispatch an 'update' event so that modeSelectNote can reselect and redraw
the note after some change happens to it.

TODO - make the buttons work / check the OSM API stuff.
2018-07-11 23:10:01 -04:00
Bryan Housel
0d7c292c23 Refactor out uiNoteHeader and uiNoteComments into separate modules
uiNoteEditor was getting big!
2018-07-10 21:45:02 -04:00
Thomas Hervey
eafae6c58c WIP: update service calls; todo: note update event handling 2018-07-10 13:50:36 -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
Bryan Housel
de718002b9 Replace suburb with town on "thank you for editing near"
(closes #4989)
2018-05-13 16:30:12 -04:00
Bryan Housel
7a0d0352d2 Use connection.disabled to prevent dragging from breaking a relation
(closes #4921)
2018-04-14 23:12:53 -04:00
Bryan Housel
8fb083578f Prevent drag/connect which could damage relations
(closes #4921)
2018-04-12 17:32:16 -04:00
Bryan Housel
2ed2d79aef Thank the user for their contribution 2018-04-04 23:49:42 -04:00
Bryan Housel
410197ce00 Vertex navigation for home/end should work with way selected
(closes #4841)

Before, first/last keyboard shortcuts only worked if you had a vertex selected.
Now you can navigate to the first/last vertices even if you have the way selected.
2018-03-01 22:23:55 -05:00
Bryan Housel
9b200cf514 Code cleanups, changes to replaceMovedVertex in moveAction
Trying to eliminate the minimum 10m distance for replacing the original
junction vertex - this is a small threshold.  When _not_ replacing this
vertex, the unzorro code will wreck havok on a traffic circle.
(If there is no suitable vertex to use, it will snap to a point between
the nearest vertices, see #4146)
2018-01-28 23:56:03 -05:00
Bryan Housel
d5bf2d9762 Add geoHasLineIntersections, better for testing multipolygon rings
(closes #4741)
2018-01-24 23:16:51 -05:00
Bryan Housel
300616819d Don't use the same keybind id for modeSave (esc dialog) and uiSave (Ctrl+S)
(closes #4728)
2018-01-24 13:46:01 -05:00
Bryan Housel
8c9a0eb2c1 Fix doubleclick on line to create a point
(closes #4691)
2018-01-17 09:23:09 -05:00
Bryan Housel
f0a27bc1ec Simplify way segmentation and fix bug with adjacent segment type
(closes #4669)

Now instead of creating MultiLineString targets, we just create a bunch of
LineString targets.  This makes the code simpler, and anyway the entity is
still there in `properties` for drawing code to decide what to do with the target.

Incidentally, this change allows iD to support an extrusion operation.
(Because each way segment has its own unique GeoJSON target now)
2018-01-09 10:12:29 -05:00
Bryan Housel
e661281e38 Prevent self intersecting lines without a junction node
(closes #4646)
2018-01-08 19:17:50 -05:00
Bryan Housel
ea9643e08b Allow Alt/option key to disable geometry check and nope cursor
(re: #4646)
2018-01-08 15:47:29 -05:00
Bryan Housel
590487d237 Fix escape keybind when conflicts ui is active
(re: 4351)
2018-01-06 23:16:48 -05:00
Bryan Housel
a22cfe64b8 Avoid loading circular relations by storing ids in _loaded object
(re: #3056)
2018-01-06 00:30:26 -05:00
Bryan Housel
ac86869b4a Add conflict checking progress, guard code for user authentication 2018-01-05 18:11:49 -05:00
Bryan Housel
a63c4a72fe Improvements to save flow
- Attempt fast save first, only perform conflict resolution if necessary (re: #3056)
- Block reentry of save, and dont keep focus on save button (closes #4641)
- Refactor modeSave() for code clarity (avoid shared state in closure variables)
2018-01-05 15:11:44 -05:00
Bryan Housel
8914d1ce36 Variable cleanups and formatting 2018-01-04 16:13:13 -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
9c27893748 Check for valid multipolygon geometry when dragging nodes
(this can get a bit expensive for large/complex multipolygons)
2017-12-31 02:26:19 -05:00
Bryan Housel
4f02340374 Extract self-intersection code to geoHasSelfIntersections
Test for self-intersecting areas in both drag_node and draw_way
2017-12-28 23:10:52 -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
fa7a6ebb12 Snap to nope line targets too, also remove svgBlocker, not needed
(it's easier to just class the surface, and won't interfere with snapping)
2017-12-27 22:51:36 -05:00
Bryan Housel
ee617779a4 Snap to nope targets too (snapping is useful feedback)
Also remove "acting" cursor, which was overriding the no-action
cursor in some situations.
2017-12-25 23:11:00 -05:00
Bryan Housel
009d7b0d65 Add layer blocker and polygon self-intersection geometry check 2017-12-24 09:21:59 -05:00
Bryan Housel
d6e8ca2a1c Transitioned bouncebacks when user drags node onto a nope 2017-12-22 21:06:44 -05:00
Bryan Housel
5d9b051f84 Fix drag_node for touch targets and line snapping 2017-12-21 20:31:20 -05:00
Bryan Housel
f58349864c Add support for nope targets, line sub-segment targeting 2017-12-20 13:52:16 -05:00
Bryan Housel
7994baae23 WIP: trying singular activeID and smarter target drawing code
The goal here is that the code that draws the targets should know better
what parts of the lines/vertices are targetable, rather than just
relying on CSS to ignore the pointer events on the whole line.

e.g. when drawing a line, it's ok for it to loop back and connect
to itself, just not on a segment or vertex adjacent to the active
node.
2017-12-19 11:23:35 -05:00
Bryan Housel
7a8f50c74e More fixes for drawing/snapping, don't draw touch targets for activeIDs 2017-12-18 22:54:49 -05:00
Bryan Housel
7155ef8bc6 Fix double clicking on a way to create a vertex 2017-12-18 16:09:07 -05:00
Bryan Housel
2e2b037e36 Move a bunch of commonly used vector and projection math functions into geo
- geoVecAdd
- geoVecSubtract
- geoVecScale
- geoZoomToScale
- geoScaleToZoom
2017-12-18 15:05:42 -05:00