17 Commits

Author SHA1 Message Date
Martin Raifer
8e8c5a8621 Render oneway markers inline in dashed lines (#10849) 2025-03-20 14:01:26 +01:00
Quincy Morgan
fd180ff60c Improve performance somewhat in some scenarios (re: #7656) 2020-06-22 13:35:51 -04:00
Bryan Housel
7a6c63fcc5 Remove lodash extend (re: #6087) 2019-03-23 00:38:39 -04:00
Quincy Morgan
9d940fffdb Fix issue where untagged multipolygon member lines would render as lines instead of area edges
Show recents in the ribbon again
2019-03-20 15:05:35 -04: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
9cd40f22be When there is no activeID, we can memoize svgSegmentWay 2018-11-12 12:17:12 -05:00
Bryan Housel
0f07393fb3 Fix data file tests (in both phantom and real browsers) 2018-08-23 11:11:14 -04:00
Bryan Housel
bc18f538a0 Use geojson hashcode instead of id for path cache 2018-08-23 01:13:03 -04:00
Bryan Housel
80b583a6f0 WIP on feature deduplication across tile boundaries
It seems like the ids stored in the features are not reliable, so I'm trying
to generate ids
2018-08-22 23:16:31 -04:00
Bryan Housel
94f89f67c2 Adjacent segments should only be nope'd on the active (drawing) way
(closes #4713)
2018-01-20 00:09:04 -05:00
Bryan Housel
f0a27bc1ec Simplify way segmentation and fix bug with adjacent segment type
(closes #4669)

Now instead of creating MultiLineString targets, we just create a bunch of
LineString targets.  This makes the code simpler, and anyway the entity is
still there in `properties` for drawing code to decide what to do with the target.

Incidentally, this change allows iD to support an extrusion operation.
(Because each way segment has its own unique GeoJSON target now)
2018-01-09 10:12:29 -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
6881205d43 All touch targets are GeoJSON now
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
2018-01-01 22:37:10 -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
fa7a6ebb12 Snap to nope line targets too, also remove svgBlocker, not needed
(it's easier to just class the surface, and won't interfere with snapping)
2017-12-27 22:51:36 -05:00
Bryan Housel
7851c49e80 Fix nopefilters by testing the original id for the filter 2017-12-22 00:26:39 -05:00
Bryan Housel
6d7659b3bb Refactor common helper code to svg/helpers.js, add area nopes 2017-12-21 10:36:02 -05:00