29 Commits

Author SHA1 Message Date
Martin Raifer
85022dcc6c render operations texts with lang attribute 2022-06-23 19:23:16 +02:00
John Firebaugh
1457759994 Add support for connectivity relations 2021-09-08 20:30:38 -07:00
John Firebaugh
a14cf49710 Disable merge operation when it would damage relations
The operation is disabled when attempting to join ways which don't belong to identical sets of relations. Restriction relations are excluded, because they are already handled with slightly different logic.

Fixes #8674
Fixes #8645
Fixes #3825
Fixes #1512
2021-09-04 15:42:07 -07:00
Quincy Morgan
22df464e0d Fix issue where valid merge operations could be blocked
Disable merge when it'd create a redundant multipolygon or add a redundant membership
2020-06-29 10:51:12 -04:00
Quincy Morgan
8b258d2cbd Load the maximum nodes per way value from the OSM API and add a getter to the service object
Disable the Merge operation if the resultant way would have more than the maximum number of nodes (close #6030)
Simplify some code in operationMerge
2020-06-08 14:38:49 -04:00
Quincy Morgan
db9eed2434 Move the edit menu logic to uiInit
Make context the first argument of operation objects
Add Paste operation to edit menu when opening the context menu on a blank area of the map (close #2508)
2020-05-14 15:49:35 -04: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
da882c1e80 Don't reselect trivial points after merging 2020-03-23 13:23:40 -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
966f5c3586 Add explicit validation calls to each operation
This is cleaner than adding hooks to transitionable actions, or performing validation
on every history change.  We want validation to run after each operation, but not
while the user is drawing lines or typing in fields.
2019-05-06 14:49:46 -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
f309e925d8 Memoize disabled for all the other operations too
see 81127d71f
2019-04-10 11:28:41 -04:00
Bryan Housel
9f623836cd Handle tooltip disabled reasons 2018-04-25 23:32:57 -04:00
Bryan Housel
2909162158 Rename merge_way_nodes to merge_nodes, update tests 2018-04-25 20:57:40 -04:00
Nikita Mashukov
da0b42e727 merge way nodes action is added 2017-10-28 21:05:50 +07:00
Bryan Housel
9882cf1d7b Don't rm old preset tags post merge, but do rm area=yes when setting preset
(closes #4114)
2017-06-22 17:49:45 -04:00
Bryan Housel
894bd615c9 Preserve the undo annotation when doing point-area merge
(closes #4113)
2017-06-21 18:56:45 -04:00
Bryan Housel
775b4eaafa After merge, rematch preset and update tags if necessary
(closes #3851)
2017-03-02 11:03:45 -05:00
Bryan Housel
e756520bd8 suppressMenu(true) is now the default 2017-02-21 15:47:22 -05:00
Bryan Housel
2ce78d6c43 Call annotation as a function instead of a property
This is because, like tooltip(), it doesn't always make sense to call it,
and it should never get called if the operation is not available.
2017-02-15 23:02:13 -05:00
Bryan Housel
028ef3de3f Expose annotations for each operation 2017-02-15 22:01:30 -05:00
Bryan Housel
c2713c3a3f For node-way merge, preserve original node if possible
(closes #3683)
2016-12-31 02:01:13 -05:00
Bryan Housel
087a8c62d1 Behaviors for all Operations 2016-12-20 00:28:24 -05:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Tom MacWright
af776501d3 Require locale, second pass (#3259)
* Require locale, second pass

* Remove t global, remove t where it isn't needed
2016-07-21 16:20:13 -04:00
Kushan Joshi
39c82af158 Sort modules [eslint rule] 2016-07-06 12:12:08 +05:30
Kushan Joshi
52c466bc27 external modules for operations 2016-06-22 12:34:43 +05:30
Kushan Joshi
2db0f636b1 modularize iD.operations 2016-06-16 00:42:43 +05:30