Commit Graph

352 Commits

Author SHA1 Message Date
John Firebaugh 3e7b0b0d98 Optimize iD.Connection
The big win here is using direct property accessors on
node attributes rather than iteration. The rest is just
micro-optimization.
2013-02-10 12:31:59 -08:00
John Firebaugh 65ab71c3d0 Extract iD.ui.SourceSwitch 2013-02-09 17:04:39 -08:00
John Firebaugh 843baa11c0 graph -> core
This matches how it's described in ARCHITECTURE.md.
2013-02-09 15:18:54 -08:00
Tom MacWright f15191af2c Update tests 2013-02-09 18:06:35 -05:00
John Firebaugh f1079a644a Fix relation role in Split (#694) 2013-02-08 20:44:14 -08:00
Ansis Brammanis ba47d3183d Fix lasso and add it to select 2013-02-08 17:46:37 -05:00
John Firebaugh e05531ad6c Fix circularize boundary cases (fixes #494)
There are still more boundary cases even farther out. But this is
probably sufficient for the real world.
2013-02-08 12:08:48 -08:00
Ansis Brammanis a804e633f4 Fix tests, silence travis 2013-02-08 11:29:40 -05:00
Tom MacWright 57493016b6 Remove ref to 404 test, do not discard tags from empty tags 2013-02-07 17:17:24 -05:00
Tom MacWright 3626534a70 Remove deprecate tags test 2013-02-07 17:10:31 -05:00
John Firebaugh e1bc78871b Handle entities that are already deleted (fixes #672) 2013-02-07 13:46:25 -08:00
Tom MacWright edc4243673 Add includes to test, fixes tests 2013-02-07 16:36:07 -05:00
Ansis Brammanis 4f6637d58b Fix add_point tests (switch back to mouseup) 2013-02-06 19:11:28 -05:00
John Firebaugh 0af51a0ef6 Improvements to Split
* Split a closed way at selected and antipode point (fixes #651)
* Split an area into a multipolygon (fixes #572)
2013-02-06 16:00:19 -08:00
Tom MacWright 8008034697 Merge pull request #665 from systemed/dynamic-layers
Dynamic layers
2013-02-06 14:41:21 -08:00
Tom MacWright c84e0713d9 Merge branch 'master' into dynamic-layers
Conflicts:
	js/id/renderer/background_source.js
	js/id/ui/layerswitcher.js
2013-02-06 17:39:55 -05:00
John Firebaugh f6e726bcd6 Join should run Reverse where necessary (fixes #652) 2013-02-06 14:31:11 -08:00
John Firebaugh 104b02eda1 Move common setup to spec_helpers.js 2013-02-06 14:04:19 -08:00
John Firebaugh bd8c9d6a00 Support merging points into an area (#435) 2013-02-06 13:42:34 -08:00
John Firebaugh d7639acb22 Set up iD.actions.Join to be more flexible 2013-02-06 13:42:34 -08:00
John Firebaugh 53ed9df2b7 A no-op Graph#replace should not create a new graph
This is useful for reducing graph churn.
2013-02-06 13:42:34 -08:00
John Firebaugh b62f106be8 Extract Relation#replaceMember 2013-02-06 13:42:34 -08:00
Tom MacWright fbe3a41d57 Update tests for faux click events in more places. 2013-02-06 15:47:16 -05:00
Ansis Brammanis a4bf7c689f Merge DragNode and DragMidpoint
Adds shared behaviors such as snapping to DragMidpoint
2013-02-06 10:49:58 -05:00
John Firebaugh 8bee68dfbd Fix includes 2013-02-05 16:25:33 -08:00
John Firebaugh 5eb0644242 Improve multipolygon rendering
Multipolygon relations report their geometry as 'area' and are rendered
as such. However, they do not render a stroke. The stroke rendering
will come from the individual lines, which are given the tag
classes of their parent relations, allowing them to have a stroke
style matching the style of simple areas with the same tags.

Untagged circular ways are no longer considered areas. This prevents
an untagged inner way of a multipolygon from rendering as an area and
is consistent with how P2 and JOSM treat them.

In the CSS, it's no longer necessary to deal with multipolygons
explicitly in selectors. But keep in mind that area boundaries can
now be rendered either as lines or as area strokes. In most cases
the selector should be `path.stroke.tag-_____`, i.e. an explicit
`.area` or `.line` classes should not be included.

Finally, the parent ways of selected multipolygons are given the 'selected'
class.
2013-02-05 15:20:11 -08:00
John Firebaugh 13a784bea5 Better Way#asGeoJSON 2013-02-05 15:20:11 -08:00
John Firebaugh 8735413974 Relation#asGeoJSON 2013-02-05 15:20:11 -08:00
John Firebaugh 72cd6b91fa Relation#multipolygon returns coordinate arrays 2013-02-05 15:20:11 -08:00
Tom MacWright 4b76b136fa Fix tests for faux click 2013-02-05 15:58:54 -05:00
Tom MacWright f70c9037b0 Fix tests, finish work here. Needs a design hit. 2013-02-05 12:52:56 -05:00
Tom MacWright d159b37ab6 Fix tests 2013-02-05 12:10:05 -05:00
Ansis Brammanis d3d0851596 Fix svg/midpoint tests
Proper solution waiting on 369
2013-02-05 00:51:54 -05:00
John Firebaugh c9fb1444db Connect via drag and drop
Fixes #598.
2013-02-04 16:48:54 -08:00
John Firebaugh 73098d259e Specify type for relation member 2013-02-04 16:48:40 -08:00
Tom MacWright 3e71dd56cd Wipe out some tags entirely, refs #585 2013-02-04 17:20:06 -05:00
Tom MacWright bd7f302730 Show deprecated tags in save commit, validate them, add deprecatedTags
to entity type.
2013-02-04 16:45:18 -05:00
Tom MacWright 3449a680a7 Add tag deprecation action and data, not yet integrated. 2013-02-04 16:02:34 -05:00
Dr Ian b912097ee4 Tidy up: fix indents, spaces etc.
- Update orthogonalize to match new circularize.
- Add orthoganalize to test index.html
- Revert whitespace on index.html
2013-02-03 20:12:04 +01:00
John Firebaugh 80a5a083b0 Remove unused 2013-02-02 19:57:36 -05:00
John Firebaugh fc00f154a9 Dispatch a change event on merge 2013-02-02 19:47:56 -05:00
John Firebaugh 11d723819d Difference#extantIDs 2013-02-02 19:47:56 -05:00
John Firebaugh ddc5e324f6 Extract iD.Difference
iD.Difference represents the difference between two graphs.
It knows how to calculate the set of entities that were
created, modified, or deleted, and also contains the logic
for recursively extending a difference to the complete set
of entities that will require a redraw, taking into account
child and parent relationships.

Additionally, all history mutators now return a difference.
2013-02-02 19:47:56 -05:00
John Firebaugh f5036db978 Start iD.operations.Merge (#435)
It's currently limited to merging (joining) exactly two lines.

Fixes #370.
2013-02-01 17:32:33 -05:00
John Firebaugh a8410be6eb iD.actions.Join 2013-02-01 17:31:32 -05:00
John Firebaugh 20730e5f1a Entity#mergeTags 2013-02-01 17:31:32 -05:00
John Firebaugh 9120f33aa7 ReverseWay -> Reverse 2013-02-01 17:31:32 -05:00
John Firebaugh c86792a77b SplitWay -> Split 2013-02-01 17:31:32 -05:00
John Firebaugh e1d5a0cb03 Unjoin -> Disconnect 2013-02-01 17:31:32 -05:00
John Firebaugh 58fcf746a2 Delete multiple 2013-02-01 15:08:41 -05:00