Commit Graph

144 Commits

Author SHA1 Message Date
Quincy Morgan
295c53810f Fix issue where text could not be copied while a feature was selected (close #7908) 2020-09-04 10:49:02 -04:00
Quincy Morgan
43f5386dad Ignore unaffected nodes when determining if Disconnect is disabled due to lack of visibility (close #7944) 2020-09-02 13:14:19 -04: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
0c95b12964 Fix issue with extracting relations 2020-06-28 14:46:49 -04:00
Quincy Morgan
0f0f0637ee Disable Move and Rotate menu buttons for touch interaction for now (re: #7599) 2020-06-26 17:18:35 -04:00
Quincy Morgan
5f93da5a59 Add a reusable function for calculating the combined extent of multiple entities (re: #7706) 2020-06-16 13:17:43 -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
fd41e5fd75 Add specific error feedback for disabled straighten operation for multiple selected features 2020-06-08 11:16:25 -04:00
Quincy Morgan
e8a227fc59 Allow straightening a selected line between two points if the two points are visible, regardless of how long the line is 2020-06-08 10:08:52 -04:00
Quincy Morgan
ab3717bbc8 Disable the Straighten operation when not enough of the selection is visible (close #7675)
Add specific straighten tooltip and annotation labels for multiple selected lines
2020-06-05 14:59:27 -04:00
Quincy Morgan
02f8849bd0 Properly disable more operations for single nodes that aren't visible 2020-06-05 14:22:50 -04:00
Quincy Morgan
28bd985a31 Prevent disconnecting nodes that aren't mostly visible
Return 1 for geoExtent.percentContainedIn when caller is a zero-area extent contained within the argument extent
Prefix function-scope operationExtent variables with underscores
2020-06-05 13:54:41 -04:00
Quincy Morgan
790f90c11d Show "not visible" disabled reason over "connected to hidden" in the extract operation when both are applicable, in accordance with other operations 2020-06-05 13:12:51 -04:00
Quincy Morgan
6128c6514f Enable the Extract operation for multiple selected extractable features (close #7600)
Allow extracting vertices that are `via` or `location_hint` relation members
2020-06-04 16:35:25 -04:00
Quincy Morgan
6c2b097eb7 Enable disconnection of multiple selected features from each other, if connected, and otherwise from everything (close #7652)
Add specific descriptions for a wider range of disconnection scenarios
2020-06-03 14:51:31 -04:00
Quincy Morgan
084d9336c4 Anchor pasted features to the position they were copied if done so with the edit menu (re: #2508) 2020-05-15 10:55:23 -04:00
Quincy Morgan
21ed04ed65 Limit Copy operation by visible extent (close #7603) 2020-05-15 09:51:50 -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
8799011abc Fix code tests 2020-05-13 16:04:40 -04:00
Quincy Morgan
0278e700a0 Convert feature copying functionality from a standalone behavior to an operation and add to edit menu (re: #2508)
Show flash feedback message when copying features with keyboard shortcut
Disallow copying of untagged vertices
2020-05-13 15:42:28 -04:00
Quincy Morgan
e0a23723da Enable extracting lines to POIs (close #7598) 2020-05-13 11:59:55 -04:00
Quincy Morgan
04bdc4da1c Make the extract operation a single step instead of immediately entering modeMove (close #6674) 2020-05-13 10:58:53 -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
Quincy Morgan
6087aae21f Remove map convenience functions of context 2020-03-22 10:57:17 -07:00
Quincy Morgan
73d8a7f4b0 Fix code test 2020-03-21 14:32:46 -07:00
Quincy Morgan
3c0b926ec7 Replace coreContext.geometry function with a more explicit coreGraph.geometry function 2020-03-21 14:23:44 -07:00
Quincy Morgan
1041f89716 Fix line continuing 2020-03-16 13:43:24 -07:00
Bryan Housel
13ead25654 Merge branch 'external_presets' into 2.x
(re: #4994)
2020-02-05 21:32:51 -05:00
Quincy Morgan
4194194e14 Prefix file variables in operations/orthogonalize.js with underscores
Simplify multiple disabled reasons code for circularize and orthogonalize operaitons
2020-02-05 10:10:12 -05:00
Quincy Morgan
4ff634b90f Enable the circularize operation for multiple selected features (close #7326) 2020-02-05 09:57:33 -05:00
Bryan Housel
0fe766d9a4 WIP on external presets
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Quincy Morgan
960d0d58a9 Allow squaring multiple features at once (close #6565) 2019-12-12 13:56:46 -05: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
d1ad5a431f Don't check if data is downloaded for operations in the walkthrough 2019-05-10 12:44:02 -04:00
Bryan Housel
901cab57da Remove _disabled caches for operations
(re: #6296, reverts 81127d7)
see https://github.com/openstreetmap/iD/issues/6296#issuecomment-489259027
(I'll find another way to deal with the menu not matching the tooltip)
2019-05-07 10:32:12 -04: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
Bryan Housel
59c34e2537 Perform orthagonalization fixes without a transition
We can just set `action.transitionable = false` to make the action instant.
Also removes the `onCompletion` handlers. They shouldn't really be needed,
because the validator will run after the fix is applied (and at other times).
2019-05-06 10:23:30 -04:00
Quincy Morgan
e71470acf6 Remove disabled state cacheing for the delete operation 2019-05-03 13:31:28 -07:00
Quincy Morgan
a772808e04 Remove cacheing of disabled state for certain operations to avoid stale state (close #6296) 2019-05-03 13:23:24 -07:00
Quincy Morgan
ecc217f5d8 Add validation rule to flag impossible oneway highways and waterways (close #6216) 2019-04-26 12:04:43 -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
e4fc821eb0 Just use reduce 2019-04-22 09:49:17 -04:00