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.
"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"
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)
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.
(I decided that the larger context of the intersection is important and
shouldn't be hidden from the user)
Also
- show detail slider only if the intersection is complex
- hide the restriction editor completely if there is no real intersection
(e.g. junction of `highway=path`)
- includes in the message the names of the streets
- also highlights related segments and nodes along the path
The messages are currently a bit rough:
U-Turns FROM Black Horse Pike IS allowed...
VIA Main Street TO Black Horse Pike
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
(closes#4384)
- adds the `layer` field so it works like the structure field on highways
- also defaults the tunnel type to `culvert` for waterways
- also fixed so that `layer` gets removed if user changes types or clicks delete