28 Commits

Author SHA1 Message Date
Kyℓe Hensel
4747ae253c refactor isOneWay to properly support bidirectional ways (#10730) 2025-02-12 14:22:09 +01:00
Kyℓe Hensel
a2e347ac97 prevent degenerate ways caused by deleting a corner of a triangle (#10003) 2025-02-05 14:38:03 +01:00
Kyℓe Hensel
43b4b4f02b render right-sided arrows for features with lifecycle prefixes (#9493) 2023-03-03 18:53:10 +01:00
Quincy Morgan
0a0e2dcf75 Fix issue where extracting points could results in off placements (close #8246) 2020-12-11 12:50:32 -05:00
Bryan Housel
0fe766d9a4 WIP on external presets
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Bryan Housel
e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -05:00
Bryan Housel
c7e375cbd7 Preserve directionality of sided way when joining to non-sided ways
(closes #6033)
2019-03-21 22:19:05 -04:00
Bryan Housel
71b2d2c6b7 Upgrade legacy symbols in tests
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -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
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
c908807f64 Render oneway=alternating, oneway=reversible with dual arrows
(closes #4291)
2018-01-04 13:40:49 -05:00
Bryan Housel
9f1b71bb7e Add support for junction=circular (same as junction=roundabout)
(closes #4637)
2018-01-02 13:27:11 -05: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
cadb38009a Add tests for way.close, way.unclose 2017-01-09 19:58:18 -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
fa70d79622 Additional tests added for addNode, updateNode, and replaceNode. 2016-12-24 18:32:26 +01:00
Bryan Housel
9b7d79a3fe Use live bound object for presets object, change context.presets() getter 2016-11-14 15:44:02 -05:00
Bryan Housel
f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel
ad17220577 Pacify eslint 2016-10-18 00:44:31 -04:00
Bryan Housel
2023f28fee iD.Way tests need context for proper setup of areaKeys
I'm not sure why this is failing all of a sudden
I think iD.modeAddPoint was setting it up for other tests to use
iD.modeAddPoint needs to be commented out because of happen mouse handlers.
Not happy about all the side effects in our test suite :-(
2016-10-17 19:09:12 -04:00
Bryan Housel
b07bf8eaa2 Extract lane parsing code from way.js into lanes.js 2016-10-12 00:10:46 -04:00
Bryan Housel
f50e80d0b5 Refactor Intersection, Multipolygon from geo to osm 2016-10-11 23:09:27 -04:00
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00