Commit Graph

83 Commits

Author SHA1 Message Date
Thomas Hervey
75cff00a2a displaying keep right (currently as notes) 2018-12-19 13:18:37 -05:00
Thomas Hervey
b96965568f WIP: added schemas for errors and warnings 2018-12-19 13:13:30 -05:00
Huon Wilson
dd0be84da4 Add one-sided triangular markers to ways with sides (e.g. natural=cliff).
This generalizes the oneway arrow logic for adding SVG markers along a
line. Using that functionality, certain tags get arrows on their
right-hand side, indicating which side is "inside", e.g. the
right-side of a cliff is the lower side.

The list of tags considered to be sided (unless there's a
two_sided=yes tag) is:

- natural=cliff
- natural=coastline
- barrier=retaining_wall
- barrier=kerb
- barrier=guard_rail
- barrier=city_wall
- man_made=embankment

The triangles attempt to be reminiscent of the triangles used for
rendering cliffs on OSM (and elsewhere). The different tags get
different renderings (e.g. colors that match the main way, and
different spacings). In addition, natural=coastline is special-cased
to have blue markers (despite having a green way), to emphasise that
the "inside" of a coastline is the water.

Fixes https://github.com/openstreetmap/iD/issues/1475.
2018-11-28 01:45:50 +11:00
Bryan Housel
89ad643977 Let new note generate its own id, instead of using -1
Also stringify the note id (because existing notes from OSM are this way)
Also make sure comments is initialized as an Array not an Object
Also clarify some of the tests
2018-07-24 14:11:08 -04:00
Thomas Hervey
e1cb25d824 merge from 'master' 2018-07-23 18:24:02 -04:00
Thomas Hervey
e23ef4ba4a redraw on note drag. TODO: change dispatch call 2018-07-23 15:09:25 -04:00
Bryan Housel
119792fd22 Cleanups to Detach Node feature
This commit includes a bunch of minor things:
- change keyboard shortcut to 'E' to not conflict with anything
- move `disabled` check from operation into action and simplify
- use `actionMoveNode` to place the detached node at the mouse cursor
- disable the operation if the node is connected to hidden features
- lots of code simplification
- make the icon more centered
2018-07-23 13:36:34 -04:00
Thomas Hervey
bf9b19359a WIP drag note 2018-07-20 21:41:44 -04:00
Bryan Housel
1a106f5253 Make uiViewOnOSM work for notes too, add it to note_editor footer 2018-07-13 15:55:58 -04:00
Bryan Housel
ede561080d Add update method, remove getters..
This makes the osmNote work a bit more like other osm objects in iD.

- When working with the osm objects, we'll treat them as immutable.
  So all modifications will be through the update method:

  e.g. can do this in a repl, like chrome devtools console:
  >  n = iD.osmNote()
  osmNote { id: -1 }
  > n = n.update({ foo: 'bar' });
  osmNote { foo: "bar", id: -1, v: 1 }

- none of the other osm objects have getters, and in JavaScript all the
  properties are public anyway
2018-06-29 22:47:14 -04:00
Bryan Housel
fd1d2f006b Fix the osmNote initializer 2018-06-29 22:39:40 -04:00
Thomas Hervey
737ccfcfba updated: siebar displays note details on hover (via svg) 2018-06-29 14:43:01 -04:00
Thomas Hervey
3df01e27c0 added: svg notes, TODO: add icon, test 2018-06-20 17:38:45 -04:00
Bryan Housel
90876f6fec but actually link to the correct issue 2018-04-18 23:48:54 -04:00
Bryan Housel
42472b129a Link to relevant issues in comment 2018-04-18 23:46:39 -04:00
Bryan Housel
00e5e8efa0 Avoid reversing osmWays in order to "prefer a forward path"
(closes #4872, related #4859)
2018-04-18 23:43:19 -04:00
Bryan Housel
d20c537e46 Don't match a simple from-via-to restriction by taking a longer path 2018-04-11 22:54:49 -04:00
Martin Raifer
d2d464d9ee only drop restrictions from FROM towards VIA when adding new only
partially adresses bugs in #4968:

* doesn't crash anymore in complex situations (short FROM ways where both ends connect to a TO way)
* adding a only-restriction at one end of a short FROM doesn't delete restrictions on the other end of the same FROM anymore
2018-04-10 13:19:20 +02:00
Bryan Housel
7e61ef0dc1 Clearer conditional 2018-03-29 16:31:52 -04:00
Bryan Housel
4041ab48fe Only restriction along viaway can enter either at either end
(closes #4951)

Previously it would only count if the connecting node was the first one.
I guess I was only thinking about oneways only the day I wrote that code.
2018-03-29 16:19:18 -04:00
Bryan Housel
0d262e5bb5 Stricter test for whether a via way restriction matches the path
(closes #4928)
2018-03-28 23:49:08 -04:00
Bryan Housel
d4bf42b6c4 Remove code attempting to extend leaf ways
(closes #4869)

It was causing more rendering issues than it was solving
2018-03-10 17:51:17 -05:00
Bryan Housel
88dea28cf7 only_ restrictions only count if they leave the FROM towards the VIA
(closes #4849)
2018-03-09 22:39:30 -05:00
Bryan Housel
ecd63cdad2 Use maxDistance passed in to osmIntersection() in turn search
(closes #4844)

The maxDistance was previously hardcoded to 30 meters.
Now we pass it in as a parameter when creating the intersection.
But we need to honor that same maxDistance later when walking the graph
to find turns from.
2018-03-02 17:27:57 -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
156d0fd681 Drop confusing fromOnly code, consolidate path highlighting code 2018-02-21 00:33:41 -05:00
Bryan Housel
200098dff9 Render restriction paths with red/green/blue shadow 2018-02-19 21:30:47 -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
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
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
1612326ffa Move dist/via sliders to bottom, add imperial/metric conversion 2018-02-13 17:25:49 -05:00
Bryan Housel
777585317a Better inference of u-turns via way 2018-02-12 14:42:39 -05:00
Bryan Housel
957896656a Detail slider affects turns, but not geometry
(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`)
2018-02-09 22:11:22 -05:00
Bryan Housel
47eb5256cc WIP: add detail slider to restriction editor 2018-02-09 16:22:49 -05:00
Bryan Housel
0cbff57dc9 Cycle through only_ turn restriction states
(re: #2622)
2018-02-07 19:04:28 -05:00
Bryan Housel
ea4ac80fee Extend max distance to 30m, but as measured from starting vertex 2018-02-07 09:27:54 -05:00
Bryan Housel
5ca56b6873 Handle situation where nodes have no loc (like in tests) 2018-02-07 01:16:14 -05:00
Bryan Housel
aa7925a918 Extend leaf ways, so they don't stop within the viewport 2018-02-07 00:07:38 -05:00
Bryan Housel
520cfd3276 Fix bug causing improper calc of from/via/to metadata after trimming
This is the part of the algorithm where trivial sections get trimmed
from the vgraph.  Removing a vertex from `vertexIds` means "stop checking
this one".  But there were some situations where it could get removed
twice, so we now just verify that `vertexId` is actually in the array
before calling `splice`.
2018-02-06 14:34:26 -05:00
Bryan Housel
c1378a141f Add support for complex intersection and via way restrictions 2018-02-02 19:58:09 -05:00
Bryan Housel
80a998e9c5 Support multiple semicolon delimited direction values
(closes #4755)
2018-01-29 17:49:08 -05:00
Bryan Housel
b35f6f3f15 highway=motorway_link no longer implies oneway=yes
(closes #4727)

iD still explicitly set the tag, and default it to `oneway=yes`
2018-01-22 21:45:14 -05:00
Bryan Housel
de488e252f Draw covered/underground lines beneath areas
(closes #4718)
2018-01-22 15:06:58 -05:00
Bryan Housel
7c918ba161 Allow Relation.replaceMember to optionally preserve duplicates
(closes #4696)
2018-01-18 16:52:23 -05:00
Bryan Housel
be46e85ec0 Move insert way pairing code from osmJoinWays to actionAddMember
(tests for actionAddMember now passing!)
2018-01-16 17:41:14 -05:00
Bryan Housel
221158e918 WIP: Add insertHint to actionAddMember, actionSplit 2018-01-15 23:13:59 -05:00
Bryan Housel
03fa6e7be9 Add tryInsert option to osmJoinWays 2018-01-15 22:02:43 -05:00
Bryan Housel
0382ce7d4b Updated function doc 2018-01-14 21:45:25 -05:00
Bryan Housel
8dbb6eb20c Return reversal actions performed by osmJoinWays
(see #4688)
2018-01-13 01:45:46 -05:00