Commit Graph

104 Commits

Author SHA1 Message Date
John Firebaugh 08bd7e583a Define Relation#asJXON (allow relations to be saved) 2013-01-28 10:19:11 -05:00
John Firebaugh f6ff3e678b Use osmId/Entity.id.toOSM 2013-01-28 10:16:51 -05:00
John Firebaugh 2ac0f1dc26 Don't rely on OSM IDs being in range of JS numbers 2013-01-28 10:15:17 -05:00
John Firebaugh 47ef222f38 Convert iD.format.XML to member functions 2013-01-27 21:50:08 -05:00
John Firebaugh 646c746991 Convert iD.format.GeoJSON to member functions 2013-01-27 21:50:07 -05:00
John Firebaugh e09666bbdc Fixing draw mode bugs
Disabling interactive draw undo for now. I know how to fix it
but it's a bit tricky. So undo will just drop you out to browse
mode for the time being.

Fixes #477.
Fixes #516.
2013-01-26 15:24:14 -05:00
Tom MacWright 401fe94f2c Merge branch 'master' of github.com:systemed/iD 2013-01-25 18:49:01 -05:00
Tom MacWright 4e2124e74f jshint 2013-01-25 18:48:07 -05:00
Ansis Brammanis 8f8e3955b5 Revert "Use object.create for graph.entities"
This reverts commit 78993bc080.
2013-01-25 18:08:48 -05:00
Ansis Brammanis db0ba2c88c Revert "Difference only changed entities"
This reverts commit 74d006ea08.

Conflicts:

	js/id/graph/graph.js
2013-01-25 18:05:38 -05:00
Tom MacWright 5645a48feb More jshint 2013-01-25 17:55:43 -05:00
John Firebaugh c981fe5d80 Revert "Wrap all actions in Graph#update"
This reverts commit 3105923371.

See #508.
2013-01-25 16:17:26 -05:00
John Firebaugh 5ea855e18d Replace Graph#fetch with Graph#childNodes
Having two kinds of Ways (fetched and non-fetched)
introduced some accidental complexity. This brings things
more in line with how parentWays/parentRelations work.

Fixes #73.
2013-01-25 15:10:44 -05:00
Ansis Brammanis 74d006ea08 Difference only changed entities 2013-01-25 15:07:58 -05:00
Ansis Brammanis 78993bc080 Use object.create for graph.entities 2013-01-25 14:35:46 -05:00
John Firebaugh 3105923371 Wrap all actions in Graph#update 2013-01-25 13:43:35 -05:00
John Firebaugh 4874199401 Add Graph#update
This can be used to reduce graph churn when there are
multiple changes to make.
2013-01-25 13:27:33 -05:00
John Firebaugh 18c7267010 Extract Draw behavior
Fixed some bugs but introduced others.
2013-01-24 17:00:48 -05:00
Tom MacWright 32ea30c3fb Use isPoi for determining whether points are pois or not 2013-01-23 19:14:54 -05:00
John Firebaugh 278bb4a51c Fix some cases where a degenerate way was created 2013-01-23 12:40:27 -05:00
John Firebaugh 292c916cb1 Converting some actions to entity methods
The guidelines here are:

Entity methods:
  return a modified entity
  don't necessarily maintain whole-graph consistency

Actions:
  return a modified graph
  always maintain whole-graph consistency
  call entity methods liberally
  generally don't call other actions
2013-01-23 12:40:27 -05:00
John Firebaugh 8e92fffa1a Freeze loc 2013-01-23 10:07:10 -05:00
John Firebaugh c263ebd4dc iD.util.geo => iD.geo 2013-01-22 18:20:20 -05:00
John Firebaugh 381794e7a1 Fix Relation#multipolygon for unmatched inner rings (fixes #461) 2013-01-22 17:54:57 -05:00
John Firebaugh d74bf1e39a Use proper prototypal inheritance and less dynamic new 2013-01-22 17:38:52 -05:00
John Firebaugh 814c3608db Hook into undos in a different way
This way doesn't depend on details of keybindings and
the undo button.

Also, implement this in DrawArea mode.
2013-01-22 14:55:08 -05:00
Ansis Brammanis a97a4e4617 Fix redrawing shared vertices 2013-01-20 19:05:53 -05:00
Brandon Liu ded802049a add history.numChanges method.
Use hasChanges/numChanges to toggle Save button and show confirmation dialog when navigating away from page.
2013-01-19 23:16:48 -08:00
Brandon Liu d83ec7f1eb Create method history.hasChanges 2013-01-19 23:01:47 -08:00
John Firebaugh 95800741fd Add some utility methods to Way 2013-01-18 14:44:29 -08:00
John Firebaugh b27903f7b5 Add Relation#isRestriction 2013-01-18 14:44:28 -08:00
John Firebaugh 3349e1f69c Add some utility methods to Relation 2013-01-18 14:44:28 -08:00
John Firebaugh bf251dce15 Handle incomplete relations 2013-01-17 17:37:50 -08:00
John Firebaugh 9abe3af312 Fix extent and difference rendering for multi polygons 2013-01-17 14:27:01 -08:00
John Firebaugh 5a2444b551 Extract and fix extent/intersection calculations
Extents are now [[min x, min y], [max x, max y]].
2013-01-17 14:27:01 -08:00
Tom MacWright 9b21fae8cb Validation. This adds basic validation and display to commits
Included is

* Untagged POIs, ways, areas
* Tags that suggest that lines should be areas
2013-01-17 14:46:39 -05:00
Tom MacWright 6407fa464c Run intersection on difference changes, do not use compact. Fixes #334 2013-01-16 14:06:11 -05:00
Tom MacWright 0e9e14102e Cache fetch results, higher features limit 2013-01-16 13:54:53 -05:00
Tom MacWright 87c341d7e0 Fix jshint problems. 2013-01-16 12:39:35 -05:00
Ansis Brammanis fc272199c7 Fix difference 2013-01-16 11:34:50 -05:00
Ansis Brammanis 0a1e16a319 Nodes with changed parents added to difference 2013-01-16 11:31:36 -05:00
John Firebaugh 1d707b0eb2 Match inners with outers
After thinking about how the `evenodd` fill rule works, I pretty sure
we don't actually need to do this. If I'm right, I'll back it out, and
it will be in the history if we need it for some other purpose.
2013-01-13 18:17:16 -08:00
John Firebaugh 67c8e287cf Start on multipolygon reconstruction algorithm 2013-01-13 17:20:04 -08:00
John Firebaugh ddaca08fb1 Clean up parentWays, apply same algorithm to relations 2013-01-12 11:03:45 -08:00
John Firebaugh 6e044f3607 Store flag on _parentWays itself, fixes #392
Relying here on the fact that `calculated` will never
collide with an actual entity ID.
2013-01-12 10:55:18 -08:00
Ansis Brammanis bb65916e06 Fix careless naming, fixing node dragging 2013-01-12 02:15:33 -05:00
Ansis Brammanis 62e78b5b9b clean up parentWays 2013-01-11 20:37:32 -05:00
Ansis Brammanis a08dd7ecce More efficient parentways 2013-01-11 19:14:17 -05:00
Tom MacWright 68e79ef81d Merge branch 'master' of github.com:systemed/iD 2013-01-11 15:36:06 -05:00
Tom MacWright e30995921e Remove indirection between entity and types 2013-01-11 15:35:10 -05:00