Commit Graph

267 Commits

Author SHA1 Message Date
John Firebaugh
b30acae5c5 Fix tests 2013-01-29 18:49:50 -05:00
Tom MacWright
cdc221323c Fix tests with locale 2013-01-29 18:39:11 -05:00
John Firebaugh
65baf36143 Remove unused DragWay behavior 2013-01-29 13:19:04 -05:00
John Firebaugh
03de3ffba6 Move operation (fixes #536) 2013-01-29 13:18:23 -05:00
John Firebaugh
69d95a6082 Refactor operations
They're something distinct from actions. Actions are independent
of UI, operations are actions + UI (title, keybinding, modality,
etc.)
2013-01-29 12:05:52 -05:00
John Firebaugh
b37ef978f4 Snap to ways/vertices/midpoints when drawing (#240)
Also add anti-snapping behavior when option key is down.
2013-01-29 11:16:12 -05:00
John Firebaugh
e69f613b51 Order deletions in osmChange XML (fixes #541)
This relies on iteration order of JS objects, which
is technically undefined. But currently all relevant
browsers implement first-defined-first-iterated order
for non-numeric keys. And I've written the specs so that
they will fail on browsers that don't adhere to this.
2013-01-28 11:47:59 -05:00
John Firebaugh
05e3dd73a8 Push JXON.stringify's down for easier testing 2013-01-28 11:24:52 -05:00
John Firebaugh
08bd7e583a Define Relation#asJXON (allow relations to be saved) 2013-01-28 10:19:11 -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
ec0c02a9dc Whitespace 2013-01-27 21:50:08 -05:00
John Firebaugh
de7fad5803 Move remaining XML stuff to Connection 2013-01-27 21:50:08 -05:00
John Firebaugh
76c108fc92 Remove unused 2013-01-27 21:50:08 -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
John Firebaugh
66ac8349ac Stack areas by area (#324)
This doesn't address stacking multipolygons, or interleaving
areas and multipolygons. More and more, I'm thinking we should
just merge the two into a unified "area" geometry.
2013-01-25 17:13:34 -05:00
John Firebaugh
98073b0d26 Add pending tests for #508
Update DeleteWay tests to use Graph#update. Eventually we
should do this for all action tests.
2013-01-25 16:35:50 -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
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
454cf0b16c Close menu on map move (fixes #482) 2013-01-24 19:07:05 -05:00
John Firebaugh
dd03544a00 Extract AddWay behavior 2013-01-24 18:04:40 -05:00
John Firebaugh
18c7267010 Extract Draw behavior
Fixed some bugs but introduced others.
2013-01-24 17:00:48 -05:00
Tom MacWright
ce78e34b34 Merge, rename to radial menu and remove pi 2013-01-24 13:11:52 -05:00
John Firebaugh
1be596c21b Fix tests 2013-01-24 11:26:57 -05:00
John Firebaugh
b6d8ddc2f8 Remove unused branch and obsolete test 2013-01-24 11:21:12 -05:00
Tom MacWright
2b4b8cb5fe Merge pull request #468 from systemed/labels
Labels
2013-01-23 16:21:01 -08:00
John Firebaugh
f7a10c1ab6 Fix tests 2013-01-23 18:39:18 -05:00
Ansis Brammanis
d14fdfa828 Remove geo.centroid(), use d3's instead 2013-01-23 18:39:14 -05:00
Ansis Brammanis
d387a31177 Add tests for new geo utils 2013-01-23 16:59:08 -05:00
Ansis Brammanis
8b43094566 Fix tests 2013-01-23 16:34:23 -05:00
John Firebaugh
3138ba2805 Handle incomplete relations in SplitWay (fixes #466) 2013-01-23 15:52:35 -05:00
John Firebaugh
d6d1709e7b Trying out radial menus for operations UI (#226) 2013-01-23 15:34:04 -05:00
John Firebaugh
72618574f3 Rename permitted -> enabled and add to more actions 2013-01-23 15:33:30 -05:00
Tom MacWright
671e138fcd Fix flash test 2013-01-23 15:32:25 -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
Tom MacWright
eefa22531c Simplify indentation, add blocking modals. Fixes #412 2013-01-23 12:30:22 -05:00
Tom MacWright
5c65af512d Test and fixup centerEase 2013-01-23 11:35:31 -05:00
Tom MacWright
75ea4d318e Test centerZoom 2013-01-23 11:22:23 -05:00
John Firebaugh
b47bb517cf Sync packaged tests 2013-01-23 10:07:10 -05:00
John Firebaugh
29d608970b UnjoinNode action (fixes #442) 2013-01-23 10:07:10 -05:00
John Firebaugh
9331cd3def Delete obsolete tests 2013-01-22 18:23:53 -05:00
John Firebaugh
ce7e6ff831 Consistent iD prefix in tests 2013-01-22 18:23:18 -05:00
John Firebaugh
c263ebd4dc iD.util.geo => iD.geo 2013-01-22 18:20:20 -05:00
John Firebaugh
7b18674e91 This is maybe working on PhantomJS now 2013-01-22 18:15:04 -05:00
John Firebaugh
381794e7a1 Fix Relation#multipolygon for unmatched inner rings (fixes #461) 2013-01-22 17:54:57 -05:00
John Firebaugh
f2c6227cb3 Fix build
Failing due to a bug in PhantomJS (a.k.a Webkit), see
https://github.com/tmcw/happen/issues/5
2013-01-22 17:36:06 -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