Commit Graph

101 Commits

Author SHA1 Message Date
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
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 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 4d66cacb27 Nodes needs Array.length not Set.size 2019-04-19 11:04:41 -04:00
Bryan Housel 0a77a494aa Merge branch 'master' into validation_and_change_perf 2019-04-10 14:22:20 -04:00
Bryan Housel f309e925d8 Memoize disabled for all the other operations too
see 81127d71f
2019-04-10 11:28:41 -04:00
Bryan Housel 81127d71f3 Cache disabled() results in straighten action for consistent response
What could happen was:
- user could right click on a line
- this would trigger `disabled()` checks for each operation buttons
- the line was not fully downloaded, so would return `disabled()` 'not_downloaded'
  (and also start download of the missing tiles)
- then the tooltip would pop into existence, calling `tooltip()`
- which calls `disabled()` again
- but this time it's fine and the `disabled()` is false
- so you'd see a greyed out button but the tooltip said everyting is ok and
  you can click the button anyway

I fixed this by just caching the disabled test.  This is probably ok anyway
because these tests can be expensive, and then the user will see a consistent
message like "The line is not yet fully downloaded".

If the user clicks off the line and back onto it, iD will reenter select mode,
rebuild the menu, redo the disabled test, and they will see the button enabled.
2019-04-10 10:19:23 -04:00
Bryan Housel e30090996b Add loadTileAtLoc to fetch data tile for a specific location
(closes #4890)

This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
2019-04-09 23:49:31 -04:00
Quincy Morgan 89d8f887be Allow disconnecting multiple selected vertices at once (close #6164) 2019-04-09 14:04:52 -07: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
J Guthrie ac29803b6f Fix eslint error 2019-04-08 16:38:10 +01:00
J Guthrie 4d24db597e Small refactor to improve efficiency 2019-04-08 16:28:01 +01:00
J Guthrie 7edebb897f Only allow disconnect when selected ways relate to selected node 2019-04-08 12:41:05 +01:00
Quincy Morgan 8779e1a6dc Add Downgrade operation to remove most tags from features but retain address and building tags instead of immediate deletion 2019-04-02 11:09:08 -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
Quincy Morgan 4cc8d796a6 Prevent deleting features with Wikidata tags (close #5853) 2019-03-27 16:02:02 -04:00
Bryan Housel 5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel 5e1ff74199 Replace lodash difference, intersects, union
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel 1ce4f0ad6a Remove lodash without
(re: #6087)
2019-03-25 21:56:54 -04:00
Bryan Housel 76e0d13729 Remove lodash every and filter
(re: #6087)
2019-03-23 01:22:56 -04:00
Bryan Housel 7a6c63fcc5 Remove lodash extend (re: #6087) 2019-03-23 00:38:39 -04:00
Bryan Housel 7e6f68a1b2 Remove lodash some
(re: #6087)
2019-03-23 00:07:52 -04:00
Bryan Housel f6c284a3be Minor code cleanups, swap some math for existing functions 2019-03-22 15:29:48 -04:00
J Guthrie 97dc659b0f Fixed linting - moved function out of loop 2019-03-22 15:29:48 -04:00
J Guthrie 9d452c9ffe Fix lint issue 2019-03-22 15:29:48 -04:00
J Guthrie c3295cc174 Remove left over logging statements 2019-03-22 15:29:48 -04:00
J Guthrie 470d6c257d Update to work on ways going in opposite directions 2019-03-22 15:29:48 -04:00
J Guthrie df4f25a02c Use lodash _includes instead of standard javascript version 2019-03-22 15:29:48 -04:00
J Guthrie d07418c654 Enforce either 0 or 2 selected vertices 2019-03-22 15:29:47 -04:00
J Guthrie 24f83ba1ae Attempt to fix travis fail 2019-03-22 15:29:47 -04:00
J Guthrie 16513b1194 Update operationStraighten.available() function
- operationStraighten now allows for two vertices to be selected and straightened between
 - Added test cases
2019-03-22 15:29:47 -04:00
J Guthrie c28f0a77fe Implement new functionality 2019-03-22 15:29:47 -04:00
Bryan Housel 3f8911c149 Merge pull request #5999 from openstreetmap/squarish
Improve orthogonalization action
2019-03-01 23:28:23 -05:00
Bryan Housel fab6bd1d33 Support orthogonalizing a single vertex, add tests
(closes #2205)
2019-03-01 23:20:50 -05:00
Bryan Housel bf02ead5cc Allow orthogonalize to work on unclosed lines
(re: 5093, but see comment
https://github.com/openstreetmap/iD/pull/5999#issuecomment-468535581)
2019-02-28 23:12:04 -05:00
Brian Hatchl 1faa6ad839 Favorite preset 2019-02-20 15:23:58 -05:00
Quincy Morgan 708c5e8155 Fix crash when undoing an added line past the first node 2019-02-19 12:10:05 -05:00
Quincy Morgan 1066f8f788 Fix issue where preset browser would show after continuing a line (close #5770) 2019-01-28 08:52:20 -05:00
Bryan Housel 119792fd22 Cleanups to Detach Node feature
This commit includes a bunch of minor things:
- change keyboard shortcut to 'E' to not conflict with anything
- move `disabled` check from operation into action and simplify
- use `actionMoveNode` to place the detached node at the mouse cursor
- disable the operation if the node is connected to hidden features
- lots of code simplification
- make the icon more centered
2018-07-23 13:36:34 -04:00
Jon D 90bc0b8537 Update to prevent detachment of node when either a via or
location_hint role in a turn restriction.
Update to move any other relation to new node.
2018-07-22 19:35:29 +01:00
Jon D 3bad09d497 Merge Work-In-Progress 4320 to 4320 2018-07-06 22:20:19 +01:00
Bryan Housel 9f623836cd Handle tooltip disabled reasons 2018-04-25 23:32:57 -04:00