Commit Graph

137 Commits

Author SHA1 Message Date
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
a8f5ab206e Merge branch 'master' into discard-tags
Inline discardTags

Conflicts:
	index.html
2013-02-07 16:51:38 -05: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
3440f4254d Discard tags 2013-02-06 16:22:39 -05:00
Ansis Brammanis
449c4d235d Add option to restore or reset unsaved changes 2013-02-06 14:03:31 -05:00
Ansis Brammanis
a21da4f15f Saving graph to and reinstating from localStorage 2013-02-06 12:48:42 -05: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
bd7f302730 Show deprecated tags in save commit, validate them, add deprecatedTags
to entity type.
2013-02-04 16:45:18 -05:00
Tom MacWright
3d8f2ffb84 Consistify syntax 2013-02-04 16:08:34 -05:00
Tom MacWright
e5ad28feb7 JShint fixups 2013-02-04 12:10:23 -05: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
20730e5f1a Entity#mergeTags 2013-02-01 17:31:32 -05:00
Ansis Brammanis
846cf6e43d Add difference tests 2013-01-31 13:37:54 -05:00
Ansis Brammanis
5c8aa46e1f Fix graph.difference 2013-01-31 12:47:02 -05:00
John Firebaugh
514ec1e28b Move validate 2013-01-31 12:44:11 -05:00
John Firebaugh
7e8126ded9 I18n for modes and operations 2013-01-31 11:20:41 -05:00
Ansis Brammanis
9862238a84 Fix graph.rebase() 2013-01-30 17:04:51 -05:00
Ansis Brammanis
2fa48df9a1 Small parentWays, parentRelations perf improvements 2013-01-30 16:09:15 -05:00
Ansis Brammanis
a317859b0f Don't re-add removed parentways, don't duplicate 2013-01-30 15:44:03 -05:00
Ansis Brammanis
1b5a1b8268 Merge takes an entities object, not graph 2013-01-30 14:20:39 -05:00
Ansis Brammanis
5a35b6bfa4 Fix difference 2013-01-30 14:11:54 -05:00
Ansis Brammanis
e08364d492 working parentRels 2013-01-30 13:18:44 -05:00
Ansis Brammanis
ba68a238fe Working rebase 2013-01-30 12:26:40 -05:00
Ansis Brammanis
6c1e4e5b4d Working more-efficient parentWays 2013-01-29 13:32:39 -05:00
Ansis Brammanis
7d32af5264 work towards using prototypes for entities 2013-01-29 12:49:00 -05:00
John Firebaugh
c5d691d79d Graph#rebase 2013-01-28 16:08:08 -05:00
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