Bryan Housel
4b1f8a8f61
Merge pull request #4768 from openstreetmap/advanced_intersection
...
Add support for complex intersection and via way restrictions
2018-03-01 01:46:30 -05:00
Bryan Housel
78170f8fe9
Improve hint text to aid in localization
...
- change the "Up to {num} ways" to "Up to 2 ways"
(we don't plan to go above 2 for now)
- enumerate all the turn types No/Only/Allowed x Left/Right/Straight/U
- Add a line for "Click for" to let user know they can click to toggle
see https://github.com/openstreetmap/iD/pull/4768#pullrequestreview-100256196
2018-03-01 00:58:53 -05:00
Bryan Housel
241159b547
Cleanup docs and tests for actionRestrictTurn / actionUnrestrictTurn
...
- actionRestrictTurn will no longer "infer" the turn type
- restrictionType *must* be passed in - this is ok because the only code
we use this action (restrictions.js) already has inferred the type
- this simplifies what the action actually does
- moved the tests from restrict_turn.js that were really just testing
the restriction type inferrence over to intersection.js
(and added a few more tests for iD.osmInferRestriction)
2018-02-28 23:55:59 -05:00
Bryan Housel
e1cf49eaff
Remove the "excludes coincident highways" check
...
These should not be a thing, and if they are, I'm ok with them
being treated as 2 separate ways. We can add code back in later
if it turns out to be a widespread issue in OSM.
2018-02-28 13:42:26 -05:00
Bryan Housel
f9d000a8a5
When switching to ONLY restriction remove all other restrictions
...
But we keep them around in `_oldTurns` and will put them back if the
user clicks again to unrestrict the ONLY.
2018-02-27 22:53:46 -05:00
Bryan Housel
fb4098754c
Adjust wording of some of the restriction help sections
2018-02-27 21:14:09 -05:00
Bryan Housel
e9750140ec
Finish help, improve text and styling
2018-02-27 15:51:51 -05:00
Bryan Housel
d87a43d33a
Increase box shadow slightly so help popup stands out more
2018-02-27 09:11:39 -05:00
Bryan Housel
a700d42e7d
Much improved field help
...
- absolutely positioned attach to inspector,
- float slightly above field
- looks much better
2018-02-26 21:42:45 -05:00
Bryan Housel
6c6b1378b2
Add some restriction help images, adjust styles
2018-02-26 16:31:00 -05:00
Bryan Housel
de1fdaa21f
Add close button, remove _showing state variable
2018-02-26 13:58:50 -05:00
Bryan Housel
97cbfc5c67
Add icons and improve css styles for restriction field help
2018-02-25 22:38:13 -05:00
Bryan Housel
b3b2be95b1
WIP: Add content for turn restriction field help
2018-02-24 12:14:18 -05:00
Bryan Housel
57d2aee6c8
Add uiFieldHelp component, currently just for turn restrictions field
2018-02-23 15:09:05 -05:00
Bryan Housel
7fa27217b6
Return an indirect u-turn restriction for an only restriction
2018-02-23 11:59:44 -05:00
Bryan Housel
46cc6cc262
Update tests to use '_' id separators instead of ','
...
(using ',' with css selectors was problematic)
2018-02-23 11:30:54 -05:00
Bryan Housel
c63f79a753
Remove isComplex, not used
...
This was used to decide whether to show the "Max Via" control.
(It's not really needed for a simple intersection)
However since we added the "Max Distance" control, it just makes
sense to show both sliders, since the distance can affect the
complexity.
2018-02-22 22:36:04 -05:00
Bryan Housel
aaed678468
Localize all the strings
2018-02-22 22:26:45 -05:00
Bryan Housel
156d0fd681
Drop confusing fromOnly code, consolidate path highlighting code
2018-02-21 00:33:41 -05:00
Bryan Housel
419d1e124b
Remove fromOnly highlighting (was confusing), try to simplify
2018-02-20 17:01:11 -05:00
Bryan Housel
104e8cea5c
Adjust color for better visibility
2018-02-20 16:16:10 -05:00
Bryan Housel
7559ff68df
Highlight all the paths when hoving on the from
2018-02-20 15:45:44 -05:00
Bryan Housel
bd46d0cc4a
Highlight restriction when hovering on from
2018-02-20 13:57:51 -05:00
Bryan Housel
bbeb34626b
Show really thick path shadows in the turn restriction editor
2018-02-20 10:47:03 -05:00
Bryan Housel
4ce0b62d05
Remove unneeded hover behavior, don't hover a way that can't be a FROM
2018-02-20 10:38:50 -05:00
Bryan Housel
eb3c1f07ec
Always restyle a selected from way (don't reset it to grey)
2018-02-20 09:10:17 -05:00
Bryan Housel
200098dff9
Render restriction paths with red/green/blue shadow
2018-02-19 21:30:47 -05:00
greenkeeper[bot]
63a41956db
chore(package): update @std/esm to version 0.22.0
2018-02-19 09:39:52 -05:00
Bryan Housel
d940200ef0
osmInferRestriction can just take a turn, instead of from/to
...
This is better because it makes explicit that osmInferRestriction
needs an actual turn now (from/to with vertex, etc)
2018-02-16 13:27:23 -05:00
Bryan Housel
b84b64c79c
Avoid user-select as a byproduct of using the control and clicking
2018-02-16 13:26:41 -05:00
Bryan Housel
aff9258dee
Indirect restrictions now include only the partial path
...
This lets us properly infer the actual turn taken through the indirect
restriction using osmInferRestriction (an improvement over 5e9db0d )
2018-02-16 11:42:44 -05:00
Bryan Housel
14e904b38f
Merge pull request #4808 from bencostamagna/boatbuilder_priority
...
reduced search priority for boat builder
2018-02-16 09:15:15 -05:00
Bryan Housel
725099e6bd
Merge pull request #4809 from fritruc/4804_Mapillary_photo_overlay_can_t_get_disabled
...
do not stop mapillary autoplaying if _mlyViewer is not initialized (closes #4804 )
2018-02-16 09:07:10 -05:00
Jordane Pelloux-Prayer
ca493ec47c
fixes #4804 : do not stop mapillary autoplaying if _mlyViewer is not initialized
2018-02-16 13:01:32 +01:00
Benoit Costamagna
28cb6aa1e1
reduced search priority for boat builder
2018-02-16 11:52:05 +01:00
Bryan Housel
5e9db0d409
Move help display code, fix display of indirect only restrictions
...
"indirect only" means an only restriction elsewhere in the intersection
that affects the selected from way.
| |
---+--F--+---
A |
---v--T--+---
B |
In the above example
- 'only_straight_on' restriction "FROM way A VIA node V TO way B"
- way F is selected
This would indirectly prevent a u-turn "FROM way F VIA way A TO way T"
We want to display the straight on restriction in the UI as
"only_straight_on FROM way A VIA node V TO way B"
not
"only_left_turn FROM way F VIA way A TO way B"
2018-02-16 00:03:04 -05:00
Bryan Housel
a2b6a3b09b
Flag restriction as indirect if from doesn't match
2018-02-15 22:18:01 -05:00
Bryan Housel
f7e6eae065
Support Only Via paths, render indirect turn restriction with opacity
2018-02-15 17:27:45 -05:00
Bryan Housel
9cb3e7d03a
Adjust calculation for turn indicator placement
...
This helps move the indicator a bit further away in cases where
turn.to.node is right up very close to the turning vertex
2018-02-15 13:40:32 -05:00
Bryan Housel
d030251fbb
Ignore pointer events on restriction help
...
This prevents flickering when hovering over a turn restriction
that is up underneath where the help is drawn
2018-02-15 13:39:39 -05:00
Bryan Housel
4a7fa80225
eslint
2018-02-15 08:31:31 -05:00
Bryan Housel
050907e252
Move event bindings to update selection, so callbacks use correct vars
...
When they are on the enter selection, they can stay "sticky" which has
the effect where you might move a slider and it puts the intersection
back to how it previously was (or returns to a previous intersection)
2018-02-15 08:27:39 -05:00
vershwal
a80f5b0957
fixes 4795 : Added check for properties
2018-02-15 17:55:04 +05:30
Bryan Housel
dbdbad29c2
Make sure container has dimensions the first time
2018-02-14 21:53:56 -05:00
Bryan Housel
0381bad22d
Adjust constants, trying to avoid crunched turn indicator on leaf way
2018-02-13 17:45:45 -05:00
Bryan Housel
1612326ffa
Move dist/via sliders to bottom, add imperial/metric conversion
2018-02-13 17:25:49 -05:00
Bryan Housel
1174424f50
Adjust padding and sizing constants, return to col4 sidebar
...
I really want the sidebar back to col4, so the user sees more main map.
This makes it very tricky to fit all of the intersection in the turn
restriction editor.
2018-02-12 15:35:45 -05:00
James Kingdom
73f78c3622
Revert max nodes to 50k
2018-02-12 19:54:19 +00:00
Bryan Housel
c9dac22218
Render turn indicators slightly closer to turning vertex
2018-02-12 14:43:14 -05:00
Bryan Housel
777585317a
Better inference of u-turns via way
2018-02-12 14:42:39 -05:00