Commit Graph

610 Commits

Author SHA1 Message Date
Paul Mach
0e080b3ed6 Limit squaring to near square or near straight nodes 2013-09-29 13:44:30 -07:00
tyr
ce85e7faaf fix test case "does not delete tagged nodes" of iD.actions.Straighten
The nodes.sort() statement caused some trouble in older browsers
such as (FF 20, Chromium 25). Also, the straighten action should
conserve node order. Thus, the sorting made the test weaker than
it had to be.

This just removes the unnecessary sorting.
2013-09-29 07:47:46 -07:00
tyr
e8d637f2bb Add iD.geo.sphericalDistance
iD.geo.euclideanDistance should only be used for calculations of 
projected coordinates or display (pixel) coordinates.

iD.geo.sphericalDistance calculates approximate geographical 
distances, accounting for distortions at higher latitudes. This 
can be used for determining the nearest node (operations.Delete,
actions.Circularize) or relative length comparisons (actions.Split).
2013-09-29 07:45:04 -07:00
tyr
6afe3adfbe more clever splitting of closed ways
if a way is closed, iD needs to choose a second node to
split the way at.

This algorithm looks for a node that is both far away from
the initial node in terms of way segment length and nearby
in terms of beeline-distance. This assures that areas get
split on the most "natural" points (independent of the number
of nodes).

For example: bone-shaped areas get split across their waist-
line, circles across the diameter.
2013-09-29 07:43:20 -07:00
Paul Mach
be30344cfd Improve Circularize Action 2013-09-28 14:33:39 -07:00
Paul Mach
3ac12a1e70 Orthononalize bug fixes 2013-09-27 22:24:32 -07:00
John Firebaugh
690a04e538 Make straighten/orthogonalize act like a single operation
- Display only one or the other in the radial menu
- Rename "Orthogonalize" to "Square"
- Use "S" as shortcut for both

Refs #1839
2013-09-25 14:26:30 -07:00
Tom MacWright
d568e30cba Minor tweaks to style of test 2013-09-22 12:54:46 -04:00
Paul Mach
76e0ef7c26 Better orthogonalization of skinny quads. Fixes #1812 2013-09-21 21:21:36 -07:00
Paul Mach
b8efb00cfc Add straighten way operation and action 2013-09-20 12:14:16 -07:00
John Firebaugh
e11ab9699d Avoid consecutive identical nodes when adding a midpoint
Previously, adding a midpoint to an invalidly doubled-back
segment (aba) resulted in a self-intersection with an invalid
consecutive node (accba). Now a self-intersection is still
produced, but with only one c node (acba).

Refs #1296
2013-09-01 12:57:10 -07:00
John Firebaugh
156aa90e27 Add more turn logic 2013-08-30 19:27:21 -07:00
John Firebaugh
405a49506b Building logic for turn restrictions 2013-08-30 14:23:05 -07:00
John Firebaugh
a32ce33238 Add Way#affix 2013-08-30 13:59:29 -07:00
John Firebaugh
6a3d62e57c Fix tests 2013-08-28 11:01:16 -07:00
John Firebaugh
8a215cac81 Add "Continue" operation 2013-08-28 09:30:28 -07:00
John Firebaugh
163c85bacb Delete relations that become empty
Fixes #465
Fixes #1454
2013-08-27 12:27:11 -07:00
John Firebaugh
e5c1944e37 Fix tests 2013-08-27 11:46:24 -07:00
John Firebaugh
30f68c4ef9 Insert areas in sorted order
Fixes #1693
2013-08-26 15:27:57 -07:00
John Firebaugh
7215e91ff2 Ensure asGeoJSON returns winding orders expected by D3 2013-08-26 14:39:08 -07:00
John Firebaugh
6cdd928ea3 Default wildcard tags to "yes"
Fixes #1715
2013-08-22 14:30:27 -07:00
John Firebaugh
c7363623ad Fix tests 2013-08-22 14:16:30 -07:00
John Firebaugh
0180367399 Refactor BackgroundSource 2013-08-22 12:53:57 -07:00
John Firebaugh
a8f6c30a36 Fix test 2013-08-16 14:19:56 -07:00
John Firebaugh
2efafa087b Deduplicate entities in serialized history
Fixes #1403
2013-08-14 16:49:53 -07:00
John Firebaugh
11e2f1d1fe Merge geocoder into feature search UI 2013-07-25 19:24:07 -07:00
Vladimir Agafonkin
454eecae8f replace RTree with RBush 2013-07-21 17:20:14 +03:00
John Firebaugh
734d53e08b Refactor background in preparation for multiple overlays 2013-07-15 14:05:11 -07:00
John Firebaugh
c4cb8729eb Fix tab behavior in tag list 2013-06-21 20:10:35 -07:00
John Firebaugh
f3a089d837 Fix combobox autocomplete behavior for taginfo 2013-06-21 19:51:44 -07:00
John Firebaugh
aecb07a41a Refining combobox behavior, with tests 2013-06-21 19:23:54 -07:00
John Firebaugh
72c32ea06f Fix tests 2013-06-20 16:34:02 -07:00
John Firebaugh
bba761d8ea size -> dimensions
D3 3.2 adds selection.size, where size means "number
of selected elements".
2013-06-20 13:05:20 -07:00
John Firebaugh
21fa8c9c5d Prevent merging over restriction relations (#1512) 2013-06-18 14:25:10 -07:00
John Firebaugh
93ee3222db Fix tests 2013-06-18 12:21:56 -07:00
John Firebaugh
ddd9e4e8cc Make iD.actions.Join agnostic to selection order
This is accomplished by reusing iD.geo.joinMemberWays,
which was refactored, generalized, and renamed to joinWays.
2013-06-18 12:19:53 -07:00
John Firebaugh
e5a44e9ba1 Fix tests 2013-06-17 15:49:03 -07:00
John Firebaugh
98072bdd27 Use minzoom behavior in all appropriate modes
Fixes https://github.com/systemed/iD/issues/1599#issuecomment-19568483
2013-06-17 14:43:16 -07:00
John Firebaugh
3861879f62 Remove Connection#user and always use #userDetails
Because the embedded iD does not show the account
UI, Connection#userDetails was not being called, so
the commit UI didn't show the user name and image.

Fixes #1464
2013-06-14 13:06:13 -07:00
ProtD
80b7fd7f40 Allow to join more than two ways (#649) 2013-06-12 17:10:41 -07:00
John Firebaugh
7ec1222402 Try to insert relation members at a sensible index (#1539) 2013-06-05 16:00:53 -07:00
John Firebaugh
2d7cc2a2d1 Preserve member order as much as possible 2013-06-05 16:00:12 -07:00
John Firebaugh
33cf029d43 Extract and refactor iD.geo.joinMemberWays 2013-06-05 16:00:12 -07:00
John Firebaugh
a84a3364cc selection -> selectedIDs
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
3a7c184e69 Move the save dialog to the sidebar 2013-05-29 17:47:33 -07:00
John Firebaugh
4bdd49b5fc Adjustments to multipolygon preset
* It shouldn't appear as a search result for simple areas.
* Changing to another area preset shouldn't remove the
  type=multipolygon tag.
* It shouldn't be preferred to the Building preset, which
  matches with score 0.5.

Fixes #1546.
2013-05-29 16:00:34 -07:00
John Firebaugh
40526764bf Test / fix ChangePreset action 2013-05-29 08:44:59 -07:00
John Firebaugh
c14e2e600e Fix strokes sometimes being clipped as polygons
Fixes #1527.
2013-05-28 20:30:41 -07:00
John Firebaugh
5a8bf0fada Fix tests 2013-05-28 19:50:40 -07:00
John Firebaugh
56f8b9e4a9 Fixup after merge 2013-05-28 16:56:49 -07:00