Commit Graph

199 Commits

Author SHA1 Message Date
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
6b096eda64 Check to remove just area=yes after merging, not any area value 2020-03-23 12:54:14 -07:00
Quincy Morgan
5125c04a58 Fix issue where merging a point matching a fallback preset into an area could discard tag values (close #7446) 2020-03-23 12:47:14 -07:00
Bryan Housel
567eeac587 Make several data external instead of bundled:
Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -05:00
Quincy Morgan
f02c0cc4a7 Don't include area tag on the point when extracting a point from an area (close #7057) 2019-11-21 10:20:54 -05:00
Quincy Morgan
5640d7867a Simplify some "add bridge or tunnel" fix code (re: #7055)
Add endpoint to actionSplit to get the created ways after running the action
Change "Use bridge" or "tunnel" fix labels to "Add a bridge" or "tunnel"
Add layer tags on structure feature when adding a bridge or tunnel via a fix
Select all components of the split way when adding a bridge or tunnel via a fix
Don't recommend adding a bridge to a waterway
Don't show "change layers" fixes along with "add structure" fixes
Don't split or change the tags of coincident ways when adding a bridge or tunnel
2019-11-20 13:09:27 -05:00
Quincy Morgan
f7d8c51bd3 Convert single-member multipolygons to simple areas when merging ways (close #5085) 2019-11-19 12:48:51 -05:00
Katarzyna Król
48ccc7900e improve checking circularity and unit tests 2019-10-29 22:51:05 +01:00
Katarzyna Król
3feb20c764 disable circularize if object is already circular 2019-10-29 01:56:49 +01:00
Quincy Morgan
0e48627ee3 Fix issue with reversing nodes with absolute directions of 0 degrees 2019-09-18 13:39:20 -04:00
Quincy Morgan
516570739c Fix node reverse code test
Add more code tests for reversing nodes
2019-09-18 13:13:44 -04:00
Quincy Morgan
0c503768c6 Fix typo/lint error 2019-09-17 18:51:44 -04:00
Quincy Morgan
5c1bbfbbdc Add support for reversing secondary intercardinal directions on points 2019-09-17 17:02:34 -04:00
Quincy Morgan
c80c72ca78 Reverse degree and compass values on direction tags when reversing points 2019-09-17 16:43:55 -04:00
Quincy Morgan
291187cbd7 Enable reversing multiple selected lines or points at once (close #6810) 2019-09-17 13:38:47 -04:00
Quincy Morgan
c229326aad Allow using the Reverse operation on directional nodes (close #6850) 2019-09-17 10:57:55 -04:00
Quincy Morgan
14c0809426 Fix issue where cuisine -> diet upgrades could overwrite existing values (close #6462) 2019-05-31 08:25:29 -04:00
Quincy Morgan
0dfd0612b1 For ice rinks, prefer the "sport" values "ice_hockey" and "ice_skating" instead of "hockey" and "skating" since that latter are ambiguous
Don't remove other values when upgrading a tag value within a semicolon-delimited list
2019-05-23 15:39:15 -04:00
Quincy Morgan
460f136819 Lower default threshold for unsquare building detection to 5 degrees
Use the detection threshold for the action when fixing unsquare buildings
Don't disallow unsquare autofixing based on maximum angle
Disallow unsquare autofixing for features with wikidata tags
Don't toggle rule when selecting degree threshold field in Safari
Apply the change when pressing enter in the degree threshold field
Select the input when clicking the degree threshold field
Use the min or max threshold instead of the default when an input is out of bounds
2019-05-20 15:48:01 -04:00
Quincy Morgan
409968dfc2 Add index of tags that positively identify points or vertices, derived from the presets
Delete nodes that can only be vertices when deleting parent ways (close #6230)
Allow snapping ways to nodes that cannot be positively identified as vertex-only
2019-05-14 12:09:44 -04:00
Quincy Morgan
ad744a75ef Use "nonsquare" instead of "nosquare" for marking unsquare ways as physically unsquare (re: #6332) 2019-05-09 19:11:11 -04:00
Quincy Morgan
0e7a63f5c5 Add quick fix to unsquare way validation to tag a way as having unsquare corners (close #6332) 2019-05-09 12:04:18 -04:00
Bryan Housel
a72865e4d8 Treat anything with a from/via/to like a restriction
(closes #6221)

Applies to actions like splitting, connecting, extracting a via node, etc
2019-04-29 21:58:10 -04:00
Bryan Housel
bd2490a965 Reverse internal left/right/forward/backward keyparts
(closes #6235)

Previously only trailing keyparts would reverse:
 `cycleway:left` ⟺  `cycleway:right`
Now it can do internal keyparts too:
 `cycleway:left:surface` ⟺  `cycleway:right:surface`
2019-04-29 21:13:18 -04:00
Quincy Morgan
59bd6194e0 Add "autofix" for the unsquare building validation 2019-04-26 14:56:39 -07: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
05949608aa Support straightening of points
(closes #6217)

- Split `actionStraighten` into `actionStraightenWay` and `actionStraightenNodes`
- Now `operationStraighten` chooses the correct action depending on selected entities
- Also move `getSmallestSurroundingRectangle` from `actionReflect` to `geo.js`
2019-04-24 01:55:43 -04:00
Quincy Morgan
34fcd01f98 Add validation warning for unsquare buildings 2019-04-23 15:50:52 -07:00
Bryan Housel
bd2a33d845 Merge branch 'validation_and_change_perf' 2019-04-23 01:30:26 -04:00
Quincy Morgan
e04d860f62 Convert "Detach" operation into "Extract" operation that also works on areas (close #6203) 2019-04-22 14:46:01 -07:00
Bryan Housel
3557e3c711 Don't allow disconnecting a way if parts extend to undownloaded tiles
(re: #2248, #4245)
2019-04-20 00:02:46 -04:00
Bryan Housel
7c85cc997e Merge branch 'master' into validation_and_change_perf 2019-04-19 22:44:04 -04:00
Quincy Morgan
a892114351 Fix disconnection code test (close #4245) 2019-04-19 13:26:16 -07:00
Bryan Housel
51c1088c1b Merge branch 'master' into validation_and_change_perf 2019-04-19 15:18:23 -04:00
Quincy Morgan
130e9909f6 Allow disconnecting an entire way from other ways at once (close #4245) 2019-04-19 11:54:13 -07:00
Bryan Housel
0a77a494aa Merge branch 'master' into validation_and_change_perf 2019-04-10 14:22:20 -04:00
Bryan Housel
df1a2ea361 Prevent some actions on features that extend beyond the loaded map
(closes #2248)
2019-04-08 21:26:58 -04:00
Quincy Morgan
50a0982d79 Merge pull request #6161 from jguthrie100/fix_closed_way_disconnect
Leave way as closed when disconnecting
2019-04-08 11:08:33 -07:00
J Guthrie
00c7eaddc2 Fix to work with PhatomJS 2019-04-08 17:07:12 +01:00
Jamie Guthrie
d3d0a560eb Remove excess whitespace 2019-04-08 16:01:08 +01:00
J Guthrie
d7865ac4aa don't unclose way if it is part of a larger disconnect operation 2019-04-08 12:42:16 +01:00
Quincy Morgan
9d029a37a8 Delete newly-created untagged relations when deselecting them (close #3812) 2019-04-07 13:39:51 -07:00
Quincy Morgan
8815b878c5 Fix issue where selected way could not be disconnected if the connection point occurred more than once in the way (close #6149) 2019-04-07 12:47:20 -07:00
Quincy Morgan
34792d7fbf Don't add field defaults when upgrading tags to a specific replacement 2019-04-03 10:57:42 -07:00
Bryan Housel
cda8f657ac Swap fast-deep-equal for lodash isEqual
(re: #6087)
2019-03-29 22:17:29 -04:00
Bryan Housel
3673a7c7e7 Remove lodash cloneDeep
(re #6087)

- some were able to do a different approach
    (validations/almost_junction, and settings/*)
- some were replaced with custom speedy cloners
   (in orthogonalize clonePoints and osm.js cloneNoteCache)
- some just replaced with JSON.parse(JSON.stringify()))
2019-03-29 17:18:40 -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
3896b2282f Remove lodash isNaN, isNumber, isString, bind, uniqBy
(re: 6087)
2019-03-27 23:11:45 -04:00
Bryan Housel
3d80e6505f Remove lodash chunk, groupBy
(re: #6087)
2019-03-27 16:18:41 -04:00
Bryan Housel
8d210e8adb Remove lodash indexOf
(re: 6087)
2019-03-27 09:45:53 -04:00