Commit Graph

1122 Commits

Author SHA1 Message Date
Minh Nguyễn
bc5cbc7dfd Generalized unit keys 2018-01-09 00:13:49 -08:00
Minh Nguyễn
1d8d7a74a3 Made scale legend localizable 2018-01-09 00:10:19 -08:00
Bryan Housel
e661281e38 Prevent self intersecting lines without a junction node
(closes #4646)
2018-01-08 19:17:50 -05:00
Bryan Housel
49eb46fefb Add epsilon parameter to geoVecEqual 2018-01-08 17:04:56 -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
58eaca2aa0 Ignore area closing segment during move when validating geometry
(closes #4655)
2018-01-08 12:09:17 -05:00
Bryan Housel
8472f99347 Zooming out should not exit save mode
(closes #4664)
2018-01-08 09:49:32 -05:00
Bryan Housel
1b973f3c9b Be more careful about enter/update selection in conflict resolution ui
This fixes one of the issues in #4351 where the radio button was not
selected. This was likely introduced during the upgrade to d3 v4, now
that enter selections do not automatically flow into update anymore.
(the fix is to add a `merge` to ensure that the `selection.each` actually
has some things to iterate over)
2018-01-07 23:46:54 -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
437893ebb8 Don't reenter putChangeset, allow reuse of open changeset id
We are going to start trying an opportunistic save, then only
start the conflict resolution stuff if the server returns a 409.
Reusing an already open changeset makes sense in this situation.
2018-01-04 23:27:00 -05:00
Bryan Housel
8914d1ce36 Variable cleanups and formatting 2018-01-04 16:13:13 -05:00
Bryan Housel
286c09366a Remove unused var (eslint) 2018-01-04 15:55:53 -05:00
Bryan Housel
b2eb982044 Add support for oneway alternating/reversible to oneway check fields
Also allow checkbox field to display non-standard values
(i.e. not 'yes' or 'no) in the field label
2018-01-04 13:41:35 -05:00
Bryan Housel
c908807f64 Render oneway=alternating, oneway=reversible with dual arrows
(closes #4291)
2018-01-04 13:40:49 -05:00
Bryan Housel
1111c6b0c1 Fallback to event.keyCode if event.key is outside ISO-Latin-1
(closes #4618)
2018-01-03 23:37:35 -05:00
Bryan Housel
99a21d1117 Render points as vertices at zoom >= 18 (was > 18)
(closes #4642)
2018-01-03 16:52:29 -05:00
Bryan Housel
dba4626cfa Merge pull request #4575 from openstreetmap/background_pane
Enhancements to Background, Map Data, Help panes
2018-01-03 15:32:18 -05:00
Bryan Housel
04fa29cfe6 Move link to imagery faq, reword as "Imagery Info / Report a Problem"
(closes #4546)
2018-01-03 15:23:47 -05:00
Bryan Housel
46ebe02555 Clean up styles, move minimap toggle below background imagery list 2018-01-03 14:35:27 -05:00
Bryan Housel
53aa2973e4 Refactor display options controls to uiBackgroundDisplayOptions 2018-01-03 01:47:25 -05:00
Bryan Housel
48834a0ea5 Add reset buttons for display sliders 2018-01-02 23:41:21 -05:00
Bryan Housel
baeff8f59c Don't autocomplete a longer value if search matches a value exactly
(closes #4549)
2018-01-02 17:55:25 -05:00
Bryan Housel
8928e95da2 Allow fallback presets (area, line, point) to appear in the recent list
(closes #4612)
2018-01-02 15:07:35 -05:00
Bryan Housel
9f1b71bb7e Add support for junction=circular (same as junction=roundabout)
(closes #4637)
2018-01-02 13:27:11 -05:00
Wille Marcel
9f1b928f89 add number of nodes information to measurement panel 2018-01-02 10:45:44 -03:00
Bryan Housel
be5929d4dc Merge pull request #4602 from openstreetmap/direction_vertices
Support rendering `direction` on vertices (stop sign, traffic_signals, etc)
2018-01-01 23:02:45 -05: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
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
462fef148d Remove unused imports (eslint warning) 2017-12-28 21:20:14 -05:00
Bryan Housel
7af73c10ef Refactor geometric math functions from geo.js to geom.js 2017-12-28 01:28:38 -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
ajlomagno
5d3df25960 Moved cleanuo code to exit function in welcome.js 2017-12-27 13:19:22 -05:00
ajlomagno
81910d4f27 Fixed click counter persisting 2017-12-26 15:12:11 -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
9fbb4d350f Add geoVecEquals for strict comparisons 2017-12-23 22:33:35 -05:00
Bryan Housel
d6e8ca2a1c Transitioned bouncebacks when user drags node onto a nope 2017-12-22 21:06:44 -05:00
Bryan Housel
117ad7d6b6 Transitionable actionMoveNode 2017-12-22 16:57:27 -05:00
Bryan Housel
64a11f4cbf Restore ability to extend line at beginning or end 2017-12-22 15:08:05 -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
be00a526b6 Make sure all targets are redrawn during a mode change
There was an issue where the lines did not redraw their targets right away
when entering drag node, which could make it possible for a quick drag node
to try to connect to its parent line.  With the chooseEdge exclusion it
would not connect to the parent nearby, but in another weird part of the line.
2017-12-22 11:42:21 -05:00
Bryan Housel
7851c49e80 Fix nopefilters by testing the original id for the filter 2017-12-22 00:26:39 -05:00
Bryan Housel
2be62fffe5 All the complicated code in drawWay can be removed
Now that we can target specific segments along a line, we don't need
temporary drawing objects or extra code to check for self intersections
2017-12-22 00:01:23 -05:00
Bryan Housel
5d9b051f84 Fix drag_node for touch targets and line snapping 2017-12-21 20:31:20 -05:00