Kyle Hensel
8a4261ed7a
always use the ref as the label
2022-05-29 20:04:35 +12: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
0a0e2dcf75
Fix issue where extracting points could results in off placements ( close #8246 )
2020-12-11 12:50:32 -05:00
Quincy Morgan
ba48a861bc
Enable curly and block-spacing eslint rules
2020-11-10 14:19:11 -05:00
Quincy Morgan
cee4b0a4da
Give several functions more descriptive names
2020-06-08 09:50:13 -04:00
Quincy Morgan
ca3a0f9dbc
Fix lint warnings
2020-04-02 11:12:10 -07:00
Quincy Morgan
60f7dc7c0b
Replace presets property of context with singleton
...
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan
a1af118f0e
Ensure locales and presets are loaded before the UI loads ( close #7406 )
...
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Quincy Morgan
e391edcc5c
Namespace various internal SVG ids under ideditor (re: #7445 )
2020-03-22 14:39:40 -07:00
Quincy Morgan
6087aae21f
Remove map convenience functions of context
2020-03-22 10:57:17 -07:00
Quincy Morgan
bc0d83b5cd
Apply label baseline hack to Firefox 70+ ( close #7044 )
2019-11-13 15:36:22 -05:00
Quincy Morgan
271a4cbac7
Update rbush to 3.0.1 ( close #6359 )
2019-11-08 18:17:17 +01:00
Bryan Housel
bdb454e1b3
Remove utilCallWhenIdle, use requestIdleCallback/cancelIdleCallback
...
Places where a reset or connection switch would be problematic,
we can now cancel the callbacks.
2019-05-16 22:28:56 -04:00
Bryan Housel
d5abe468b9
Remove rest of the lodash iterators: map, reduce, forEach
...
(re: #6087 )
2019-03-29 15:14:21 -04:00
Bryan Housel
7e6f68a1b2
Remove lodash some
...
(re: #6087 )
2019-03-23 00:07:52 -04: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
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
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
bfaf17538e
Move text to single group with subgroups for halo,label,debug
2017-12-14 12:32:28 -05:00
Bryan Housel
24baa5390e
Adjust some variable names to better match what they do
...
- `nodes` are for osm nodes
- `points` are the projected locations of those node `loc` in screen space
2017-12-13 18:31:37 -05:00
Bryan Housel
d9e3367836
More improvements to label vertex avoidance
...
(re: #4271 , #3636 )
- better classification of "interesting" vertices
(include tagged, selected, or child of selected)
- now we can draw labels on selected lines again (revert #3636 )
because the labels will avoid the vertices
- if debugging is on, draw a collision box for the mouse
2017-12-13 18:05:06 -05:00
Bryan Housel
006ee691bf
Avoid placing labels in interesting points/vertices
...
(closes #4271 )
2017-12-13 14:31:17 -05:00
Bryan Housel
450392d2e5
Fix label placement for directional points rendered as vertices
2017-12-13 10:23:25 -05:00
Bryan Housel
5d5546d54d
Minor code formatting
2017-12-13 10:02:39 -05:00
Bryan Housel
38920b2c61
Reset temp placement variable each loop iteration
...
(closes #4473 )
Otherwise `if (p)` will have stale data and be truthy for vertices at low zoom
2017-11-15 13:47:59 -05:00
Bryan Housel
4d1c6796c2
Don't leave space for an area icon, if preset doesn't have an icon
...
(closes #4479 )
2017-10-31 22:22:40 -04:00
Bryan Housel
9edae82673
Convert lodah-es and d3 to named imports for svg
2017-09-25 23:16:24 -04:00
Kushan Joshi
909b72a39e
cleaning up
2017-08-24 17:03:04 +05:30
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
Bryan Housel
d5805dc3cd
import textDirection instead of caching first time rtl detection
2017-01-19 19:08:44 +05:30
Bryan Housel
afb51ab4bd
Add halo for area icons
...
(closes #3762 )
2017-01-15 01:10:28 +05:30
Bryan Housel
04b9c08bff
Adjust maki sizes and fill opacity
...
New icons are solid fill and take up a bit more of the icon space, so need to
be scaled differntly.
2017-01-14 23:06:23 +05:30
Bryan Housel
9b922899a6
Restore maki icons on vertices and areas
2017-01-14 22:08:47 +05:30
Bryan Housel
d63c766e69
Split into utilDisplayName / utilDisplayNameForPath
...
This is because utilDisplayName gets called a bunch of places and we
only want to add the Arabic reversal code for textpath labels
2017-01-03 20:58:56 -05:00
Bryan Housel
a55ab036aa
Don't assume that all the ids in selectedIDs are valid
...
(This is becuse they might have been deleted in a delete operation
and we are immediately redrawing the results of that operation before
reselecting something else)
2016-12-09 11:46:22 -05:00
Bryan Housel
1912251251
Add labels for vertices
...
(closes #2709 )
2016-12-07 16:58:27 -05:00
Bryan Housel
6b18ea76ff
Hide labels along selected ways, or near selected vertices
...
(closes #3636 )
2016-12-07 15:38:14 -05:00
Bryan Housel
8cd2d7097c
Add preset for camp_site=camp_pitch for individual pitches
2016-10-31 17:08:01 -04:00
Bryan Housel
46b6086dcf
Update projection arg for d3.geoPath(), deprecate d3.geoClipExtent()
2016-10-29 15:27:06 -04:00
Bryan Housel
efd9e6df4b
Memoize and avoid extra calls to utilDetect()
2016-10-18 21:48:39 -04:00
Bryan Housel
bf857c419a
Center label baseline hack for IE11, Edge
...
(closes #3020 )
2016-10-18 21:28:20 -04:00
Bryan Housel
0036a3b308
Assign label priority by tag key and value (e.g. for highways)
2016-10-18 15:46:24 -04:00
Bryan Housel
9d98aae955
Insert small boxes along text path into collision tree
...
(closes #1645 )
2016-10-18 15:12:09 -04:00
Bryan Housel
0d0b9b0d9b
Use geoEuclideanDistance for simpler code
2016-10-18 00:56:18 -04:00
Bryan Housel
24e83189b8
Use bulk loading for rtree inserts, preparation for collision rectangle labels
2016-10-17 23:56:42 -04:00
Bryan Housel
0c35b8f9ab
Fix bug in partial label redraw, tighten margins around line labels
2016-10-17 21:28:37 -04:00
Bryan Housel
1da02e57e2
Fix min/max collision box in getPointLabel, remove debug=true
2016-10-17 17:08:40 -04:00
Bryan Housel
f4e7cb6727
Add debugging for both drawn and skipped label collision trees
2016-10-17 16:27:47 -04:00