Commit Graph

18 Commits

Author SHA1 Message Date
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 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
Bryan Housel de488e252f Draw covered/underground lines beneath areas
(closes #4718)
2018-01-22 15:06:58 -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 96afbbd785 Refactor vector math functions from geo.js to vector.js 2017-12-28 01:08:11 -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
Bryan Housel 855c112ae0 Convert lodah-es and d3 to named imports for osm 2017-09-25 14:14:49 -04:00
Bryan Housel 8de3429f2b Fix misspelling 2017-08-06 23:59:16 -04:00
Bryan Housel 10659505e2 Add code to treat a few special tags as areas instead of lines
even in the absense of a proper `area=yes` or `areaKeys` tag.
(closes #4194)
2017-08-06 23:39:58 -04:00
Bryan Housel f109efda7b Fix close() for single node ways 2017-01-12 15:56:46 +05:30
Bryan Housel 73e27c9657 Now that updateNode preserves circularity, provide close/unclose functions
This lets us break closed ways at their connecting node in the few situations where
we actually want that behavior (disconnect action for circular non-area ways)
2017-01-09 19:41:38 -05:00
Bryan Housel 8676dd6e4c Changes to removeNode and add tests 2017-01-09 18:38:28 -05:00
Bryan Housel 7b86afc9de Changes to replaceNode and add tests, also stricter isClosed 2017-01-09 18:16:30 -05:00
Bryan Housel f510038791 Changes to updateNode and add tests 2017-01-09 17:33:46 -05:00
Bryan Housel f1cdde0f92 Changes to addNode and add tests 2017-01-09 17:33:26 -05:00
slhh 7817d6dff1 Prevent duplicate consecutive nodes in addNode, updateNode, and
replaceNode, and add some comments.
2016-12-24 18:32:28 +01:00
Bryan Housel b07bf8eaa2 Extract lane parsing code from way.js into lanes.js 2016-10-12 00:10:46 -04:00
Bryan Housel 07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00