Commit Graph

47 Commits

Author SHA1 Message Date
Bryan Housel
9b200cf514 Code cleanups, changes to replaceMovedVertex in moveAction
Trying to eliminate the minimum 10m distance for replacing the original
junction vertex - this is a small threshold.  When _not_ replacing this
vertex, the unzorro code will wreck havok on a traffic circle.
(If there is no suitable vertex to use, it will snap to a point between
the nearest vertices, see #4146)
2018-01-28 23:56:03 -05:00
Bryan Housel
710a075a90 When deleting final nodes from a way, pan to final node's location
(closes #4541)
2017-11-20 16:16:33 -05:00
Bryan Housel
3def4db09f Convert lodah-es and d3 to named imports for operations 2017-09-25 13:58:53 -04:00
Bryan Housel
5ffa8f535e Relax the availability rules for rotation and reflection operations
(closes #4237)

New rules:
- Rotation available if at least 2 unique nodes in selectedIDs
- Reflection available if at least 3 unique nodes in selectedIDs
2017-08-17 14:32:32 -04: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
6f4d490c6f Prevent delete of objects when not 80% visible
(closes #3700)
2017-03-10 22:45:42 -05: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
33227c2b53 Adjust text for Reflect operation messages 2017-02-15 16:37:37 -05:00
Bryan Housel
cb35873e29 Don't allow continue from the connecting vertex of a closed way
Now that addNode tries to preserve circularity, this
could cause the continued segment to loop back.

And anyway it's confusing why one vertex allows it and none others do.
2017-01-12 20:08:42 +05:30
Bryan Housel
c2713c3a3f For node-way merge, preserve original node if possible
(closes #3683)
2016-12-31 02:01:13 -05:00
Bryan Housel
9a922c0731 Make Reflect/Rotate unavailable for strictly linear features 2016-12-22 15:18:01 -05:00
Bryan Housel
37534aed0e More cleanup of operations and post-paste behavior
* Support move, rotate, reflect, delete post paste on multiselection
* Improve text and error msgs for singular vs multi selections
* Move `disabled` checks from actions to operations
* Reproject center of rotation (closes #3667)
* Cleanup tests
2016-12-21 23:58:13 -05:00
Bryan Housel
38e4900355 Allow rotate of multiple selected objects
(closes #1719)
2016-12-21 16:44:40 -05:00
Bryan Housel
57696ab5eb Rename rotate-way mode to just rotate 2016-12-20 13:44:39 -05:00
Bryan Housel
087a8c62d1 Behaviors for all Operations 2016-12-20 00:28:24 -05:00
Bryan Housel
35aae816b0 Expose Reflect operation behavior 2016-12-19 16:55:49 -05:00
Bryan Housel
2267035dfb Support both reflect long axis and reflect short axis operations 2016-12-16 13:59:33 -05:00
Bryan Housel
dca1c8fb41 Add reflect icons 2016-12-16 11:24:29 -05:00
Bryan Housel
e88f53ac07 Reflect around long axis by default, provide method to choose long/short 2016-12-15 18:13:28 -05:00
Bryan Housel
72c51bc283 Add getSmallestSurroundingRectangle 2016-12-14 17:21:32 -05:00
Bryan Housel
5a6045fd3d Merge branch 'master' into Psigio-3375 2016-12-14 11:30:53 -05:00
Bryan Housel
dc5da7b480 Follow next vertex when deleting, add suppressMenu when vertex following 2016-12-09 12:11:24 -05:00
Bryan Housel
3abf1b5be8 Allow reselection of next vertex even if vertex has multiple parents 2016-12-09 11:57:26 -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
Jon D
563f685f9b Fix tooltip 2016-11-06 11:30:52 +00:00
Jon D
73f3069c59 Rename for consistency, add logic to prevent flip if all of object not visible and if linked to hidden. Label does not render for message when not enabled 2016-11-06 11:15:15 +00:00
Jon D
23990214be Update to only flip around the vertical axis. Start renaming to 'reflect' 2016-11-06 10:48:48 +00:00
Jon D
c1edd0f3f9 Remove unused projection parameter 2016-11-05 20:39:43 +00:00
Jon D
8a9aabb716 Add shortcut in operations files 2016-11-05 19:36:53 +00:00
Jon D
f37475fad9 Add flip horizontal/vertical operations 2016-11-05 19:27:52 +00:00
Jon D
a4b7b341ed Alter implementation. Need to see if projection.translate is required 2016-11-05 18:23:40 +00:00
Jon D
3052466f75 Other changes to expose new operation 2016-11-05 15:04:27 +00:00
Jon D
79a69b5241 Add initial version of action and operation. Not working 2016-11-05 14:52:22 +00:00
Bryan Housel
e83b2ea2be Allow delete key without modifier as shortcut for deleting
(closes #3455)

Also fixed a minor bug in `iD.uiCmd` that was causing keyboard shortcuts
like '⌘⌫' to convert to 'Ctrl+Backspace+'  (note extra trailing '+')
It affected only the tooltip display, not the key event binding.
2016-10-24 23:57:44 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel
a86f34b4ef Pacify eslint, get build and tests running again 2016-08-26 01:15:07 -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
Tom MacWright
604d1e2719 import lodash (#3257) 2016-07-19 12:04:16 -04:00
Kushan Joshi
39c82af158 Sort modules [eslint rule] 2016-07-06 12:12:08 +05:30
Kushan Joshi
780960c711 interim 2016-07-06 00:34:35 +05:30
Kushan Joshi
9f2a251d31 Fixing Interdependecy between ui.preset and ui.core 2016-07-02 16:00:52 +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