278 Commits

Author SHA1 Message Date
Bryan Housel
0b6183e2c5 Remove any duplicate vertex created during replaceMovedVertex 2018-01-29 01:03:03 -05:00
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
7c918ba161 Allow Relation.replaceMember to optionally preserve duplicates
(closes #4696)
2018-01-18 16:52:23 -05:00
Bryan Housel
be9bbd9271 Add tests for member ordering: node, way, relation 2018-01-18 15:21:38 -05:00
Bryan Housel
8f9a46b75a Change actionAddMember to rearrange indexed members in place
This allows it to work around issues where a relation may
not be completely downloaded
2018-01-17 22:59:55 -05:00
Bryan Housel
be46e85ec0 Move insert way pairing code from osmJoinWays to actionAddMember
(tests for actionAddMember now passing!)
2018-01-16 17:41:14 -05:00
Bryan Housel
221158e918 WIP: Add insertHint to actionAddMember, actionSplit 2018-01-15 23:13:59 -05:00
Bryan Housel
03fa6e7be9 Add tryInsert option to osmJoinWays 2018-01-15 22:02:43 -05:00
Bryan Housel
075b85c81d Apply reversal actions in actionJoin
(closes #4688)
2018-01-14 14:49:57 -05:00
Nikita Mashukov
92451e7b4b Merge branch 'master' into merge-way-nodes-feature 2018-01-01 22:09:54 +07:00
Bryan Housel
96afbbd785 Refactor vector math functions from geo.js to vector.js 2017-12-28 01:08:11 -05:00
Bryan Housel
117ad7d6b6 Transitionable actionMoveNode 2017-12-22 16:57:27 -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
2edbcc4b82 Match any *:direction key, rather than hardcoding a list 2017-12-11 15:17:17 -05:00
Bryan Housel
6cfe7a2e71 When reversing a way, reverse traffic_signals:direction on child nodes
(closes #4595)
2017-12-06 20:48:21 -05:00
Nikita Mashukov
92374f7af9 tests for merge_way_nodes action 2017-10-30 22:32:48 +07:00
Nikita Mashukov
49d55b68bb merge internal way nodes too 2017-10-30 20:36:33 +07:00
Nikita Mashukov
f5951e8797 merge tags when merge way nodes 2017-10-30 20:30:14 +07:00
Nikita Mashukov
da0b42e727 merge way nodes action is added 2017-10-28 21:05:50 +07:00
Bryan Housel
c40f242b82 Depend on bhousel/node-diff3 which includes fix for hunk sorting bug
(closes #3544, closes #3058)
2017-10-24 15:38:52 -04:00
Bryan Housel
a98f57cdcb Convert lodah-es and d3 to named imports for actions 2017-09-24 21:06:52 -04:00
Lee Haugen
2343198bc2 Check final poly hull edge in search for smallest rectangle 2017-08-29 16:02:04 -05:00
Bryan Housel
01bfc67ea5 After splitting a way, update all matching relation members
(closes #4140)
2017-07-10 18:35:30 -04:00
Bryan Housel
73e27c9657 Now that updateNode preserves circularity, provide close/unclose functions
This lets us break closed ways at their connecting node in the few situations where
we actually want that behavior (disconnect action for circular non-area ways)
2017-01-09 19:41:38 -05:00
Bryan Housel
8ce6b9e185 Merge branch 'transitioned-actions' 2017-01-04 17:26:22 -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
cb70b8028f Pacify eslint 2016-12-23 12:26:00 -05:00
Bryan Housel
c48cdc7c70 Clearer intent for right triangle code 2016-12-23 12:22:48 -05:00
Bryan Housel
cc5f238042 Support transitioned orthogonalize action 2016-12-23 12:04:53 -05:00
Bryan Housel
3e82a7352c Support transitioned straighten action 2016-12-23 11:09:17 -05:00
Bryan Housel
fdc37287ec Support transitioned circularize action 2016-12-23 10:52:00 -05:00
Bryan Housel
1685e4c2b4 Support transitioned reflect actions 2016-12-23 00:56:44 -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
cad4c0090c Refactor rotation code to geoRotate, add tests 2016-12-21 11:21:06 -05:00
Bryan Housel
573f476cdd Rename actionRotateWay -> actionRotate 2016-12-20 22:38:30 -05:00
Bryan Housel
6ab9489fe7 Add utilGetAllNodes to get all nodes and descendants 2016-12-20 22:37:53 -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
e88f53ac07 Reflect around long axis by default, provide method to choose long/short 2016-12-15 18:13:28 -05:00
Bryan Housel
94933ac455 Attempt to detect shape orientation and reflect accordingly 2016-12-15 17:43:46 -05:00
Bryan Housel
72c51bc283 Add getSmallestSurroundingRectangle 2016-12-14 17:21:32 -05: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
1eaa284afe More tests, add uniq operator 2016-11-05 20:36:34 +00:00
Jon D
05421e1c25 Start adding tests 2016-11-05 20:20:27 +00:00
Jon D
dd16112aa3 Fix midpoint 2016-11-05 18:48:11 +00:00
Jon D
45635f7cdc Basic horizontal flip works, but midpoint seems incorrect 2016-11-05 18:32:26 +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