44 Commits

Author SHA1 Message Date
Martin Raifer
e07dcddfee only render addr point markers when there are addr tags
closes #11092

and also skip rendering of "placement ellipse" for address points
2025-06-05 14:36:07 +02:00
Martin Raifer
2fccd798dc fix size of touch targets for address shields 2025-04-23 12:29:35 +02:00
Martin Raifer
1a5bc72327 be a bit more lenient when determining if a node is an address node
consider some additional tags as "not interesting"/non-POI-like:
* check_date/fixme/note/note:*/survey:* — mapping related tags
* layer/level/level:ref — can be considered attributes of the address
* ref:* – often used to indicate a source ID on imported data
2025-04-23 12:02:05 +02:00
Martin Raifer
5afe43c700 show ellipsis for long housenumbers/housenames 2025-04-21 15:29:56 +02:00
Martin Raifer
aa96a67c65 use lodash-es everywhere, replace custom clamp methods with lodash 2025-04-21 14:43:35 +02:00
Martin Raifer
4254e67ca7 render addresses (housenumber/housename)
* points with a dedicated marker
* text inside of areas
2025-04-17 17:47:08 +02:00
Martin Raifer
bd1836fd0c fix maki icons, tweak rendering of icons
* maki v7+ doesn't have provide "11px" icons anymore
* use 12px for icons on points & vertices on map (instead of 11px)
* use 12px for icons on QA tool (improveOSM, osmose) markers (instead of 13px)
* drop some unused code
2022-02-14 18:07:27 +01:00
Quincy Morgan
60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan
5cab4b1386 Revert circular markers (open #6163) 2019-12-10 11:23:12 -05:00
Quincy Morgan
dffe80fb5f Taper the point marker shape somewhat (re: #6163) 2019-12-10 10:53:53 -05:00
Quincy Morgan
00e8a125e2 Make point markers more circular with larger icons (close #6163)
Tweak the grey style of points linked to wikidata
2019-12-09 17:21:33 -05:00
Quincy Morgan
c7186e2ee6 Replace usage of lodash isEqual (re: #6843) 2019-10-08 20:42:58 +02:00
Quincy Morgan
7d31c76546 Unify visual diff styles for lines and areas (re: #6843)
Render tag-only diffs in yellow instead of translucent orange
Don't use target colors for vertex diff styling
2019-10-08 20:25:09 +02:00
Quincy Morgan
2924d4619a Show visual diff for standalone points (re: #6843) 2019-10-07 16:33:35 +02:00
Bryan Housel
344aec206c Support special styling for wikidata-tagged features 2019-05-18 23:57:23 -04:00
Quincy Morgan
d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel
3bc841e95b Adjust layer ordering to draw touch targets above data layers 2018-11-09 21:48:45 -05:00
Bryan Housel
da10b6b254 Add maki- prefix to all maki icons
(re: #3924)
2018-06-05 22:12:33 -04: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
5d9b051f84 Fix drag_node for touch targets and line snapping 2017-12-21 20:31:20 -05:00
Bryan Housel
7994baae23 WIP: trying singular activeID and smarter target drawing code
The goal here is that the code that draws the targets should know better
what parts of the lines/vertices are targetable, rather than just
relying on CSS to ignore the pointer events on the whole line.

e.g. when drawing a line, it's ok for it to loop back and connect
to itself, just not on a segment or vertex adjacent to the active
node.
2017-12-19 11:23:35 -05:00
Bryan Housel
7a8f50c74e More fixes for drawing/snapping, don't draw touch targets for activeIDs 2017-12-18 22:54:49 -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
b5eaa76d1a Optimization: when moving stuff around, don't exit/enter nodes
This avoids thrashing the DOM. The positions of the nodes will still
get updated by the update selection.
2017-12-18 00:13:16 -05:00
Bryan Housel
aa68b21d7a Add touch targets for line/area 2017-12-17 22:53:58 -05:00
Bryan Housel
5cb5456869 Implement touch targets for midpoints and points 2017-12-15 22:50:55 -05:00
Bryan Housel
b9e48d1682 WIP: Move layer-hit to layer-points with explict sublayers, update tests
This is more work to further isolate the layers that entities draw to.
It makes it easier to debug what is going on, and can eventually lead to
deferred drawing, if each draw function is in its own place and not dependant
on anything else.

I've started to replace the vertex-hover with an explicit layer for touch
targets.

Also had to change a lot of the svg tests, which are really brittle.
Things would happen like - the surface would be created, it would kick of a
deferred redraw, which would notice that the zoom was 0 and call
editOff, which would remove the osm layers that were just created and
that the tests were trying to draw to. These tests need proper zoom and
projection otherwise nothing works.
2017-12-14 17:38:43 -05:00
Bryan Housel
789f1e5f6f Make sure points/vertices render the right things at different zooms 2017-12-13 08:57:43 -05:00
Bryan Housel
b394cb6dfa Variable cleanup, elminiate lodash _filter 2017-12-11 17:46:15 -05:00
Bryan Housel
8e19474293 Render directional points (e.g. benches, cameras, signs) as vertices 2017-12-11 10:48:04 -05:00
Bryan Housel
9edae82673 Convert lodah-es and d3 to named imports for svg 2017-09-25 23:16:24 -04:00
Bryan Housel
3d762b58f6 Add an ellipse to resolve point ambiguity when dragging
(closes #3536)
2017-04-26 02:08:54 -04:00
Bryan Housel
9ce06549e1 Add new poi icons, make them work on point, vertex, area label
(closes #3856)
2017-02-26 23:28:29 -05:00
Ajith Ranka
3379d5d9ba Fix isMaki, reset sizes, remove unnecessary checks 2017-01-13 15:04:58 +05:30
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel
a6d683eaf7 Code cleanups in svg, ui for selection merging, fix Mapillary. 2016-09-17 23:26:49 -04:00
Bryan Housel
273407da3d Fix svg layer selections, fix and add tests.. 2016-09-09 14:19:13 -04:00
Bryan Housel
afb88f2ae6 Fix rendering selections for all the OSM layers
This includes some renames for clarity.. "surface" -> "selection"
to make it clearer that rendering functions take a selection, and
don't necessarily render to the literal `#surface` node anymore.
2016-09-08 22:37:06 -04:00
Tom MacWright
fcb2c3df58 Fix points layer 2016-09-06 11:02:13 -04:00
Tom MacWright
68d144e0c0 Point dragging works 2016-09-03 18:01:00 -04:00
Tom MacWright
604d1e2719 import lodash (#3257) 2016-07-19 12:04:16 -04:00
Kushan Joshi
b3492b17a0 external modules for SVG 2016-07-06 14:39:14 -04:00
Beau Gunderson
fb838645ae refactor svg into ES6 modules for #3118 2016-06-16 11:58:23 -07:00