Commit Graph

153 Commits

Author SHA1 Message Date
John Firebaugh
f8e2dfb9ce Preserve existing non-tag classes 2013-01-07 21:33:35 -08:00
John Firebaugh
b6beed5606 Prefix tag classes with tag-
When re-rendering, existing non-tag-related classes
such as `selected`, `active`, `hover`, etc. should be
preserved. Without a prefix, it's difficult to
distinguish them from tag classes.
2013-01-07 19:47:56 -08:00
John Firebaugh
bcb4de4305 Reverse directional tags and roles when reversing a way
Reverse known direction dependent tags other than `oneway`.
We assume that correcting a backwards oneway is the primary
reason for reversing a way.

The following transforms are performed:

Keys:
      *:right=* ⟺ *:left=*
    *:forward=* ⟺ *:backward=*
   direction=up ⟺ direction=down
     incline=up ⟺ incline=down
        *=right ⟺ *=left

Relation members:
   role=forward ⟺ role=backward

In addition, numeric-valued `incline` tags are negated.

The JOSM implementation was used as a guide, but transformations that 
were of unclear benefit or adjusted tags that don't seem to be used
in practice were omitted.

References:
   http://wiki.openstreetmap.org/wiki/Forward_%26_backward,_left_%26_right
   http://wiki.openstreetmap.org/wiki/Key:direction#Steps
   http://wiki.openstreetmap.org/wiki/Key:incline
   http://wiki.openstreetmap.org/wiki/Route#Members
   http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

Fixes #299.
2013-01-07 16:26:56 -08:00
Tom MacWright
87671bb3e9 Test for boundary condition 2013-01-07 17:37:07 -05:00
John Firebaugh
2d3ce6c125 Extract hover behavior 2013-01-07 08:34:37 -08:00
Tom MacWright
62cdfdae2d Update tests for taginfo change 2013-01-04 16:15:13 -05:00
John Firebaugh
4a7bd26be8 Add 'Add Tag' button (#314), needs style
Fixes #281.
2013-01-03 23:16:34 -08:00
John Firebaugh
62efa1948e Add Entity#geometry, use in inspector
Fixes the icon for areas, but breaks it for vertices.
Needs a big-vertex sprite.
2013-01-02 21:59:55 -08:00
John Firebaugh
2a6145ef10 Move friendlyName to Entity 2013-01-02 21:43:35 -08:00
John Firebaugh
ec6c74ebcd Simplify inspector function nesting; cleanup 2013-01-02 21:35:09 -08:00
Tom MacWright
3544bb9d3c Add osmId to entity tests 2013-01-02 13:30:14 -05:00
Tom MacWright
06c3caa1c0 Expand util tests 2013-01-02 13:26:36 -05:00
John Firebaugh
3ffa8066c5 Taginfo typeahead on keys as well as values 2013-01-01 18:43:22 -08:00
John Firebaugh
1956c2f55d Read tags directly from value properties
Fixes #310
2013-01-01 14:38:21 -08:00
John Firebaugh
5199e0f402 Externalize api06 URL 2012-12-30 14:03:45 -08:00
John Firebaugh
c927ff5b5d Rationalize vocabulary
- nodes
  - vertices
  - points
- ways
  - lines
  - areas
2012-12-29 09:18:05 -08:00
John Firebaugh
d181df4c51 Polymorphism 2012-12-28 22:24:52 -08:00
John Firebaugh
f7dfda46b2 Move Entity subclasses to separate files 2012-12-28 22:17:09 -08:00
John Firebaugh
31502c6214 Simplify; test; fix 2012-12-28 22:13:36 -08:00
John Firebaugh
5fe22be7a0 Introduce real Entity subclasses 2012-12-28 18:42:21 -08:00
John Firebaugh
167556ab02 Eliminate attempted entity modification in format.XML 2012-12-27 18:52:56 -08:00
John Firebaugh
c66ea58d56 Move transients to graph (fixes #285) 2012-12-27 18:52:56 -08:00
John Firebaugh
6a4b75aa88 latedrag functionality was merged into iD.behavior.drag 2012-12-21 12:29:59 -08:00
John Firebaugh
f0acbc2653 loc -> point, dxdy -> delta 2012-12-21 12:10:44 -08:00
John Firebaugh
2c8bbd8985 Integrate new drag behaviors 2012-12-21 12:10:44 -08:00
John Firebaugh
2c40de62be Add iD.behavior.drag
`iD.behavior.drag` is like `d3.behavior.drag`, with the following differences:

* The `origin` function is expected to return an [x, y] tuple rather than an
  {x, y} object.
* The events are `start`, `move`, and `end`.
  (https://github.com/mbostock/d3/issues/563)
* The `start` event is not dispatched until the first cursor movement occurs.
  (https://github.com/mbostock/d3/pull/368)
* The `move` event has a `loc` and `dxdy` [x, y] tuple properties rather
  than `x`, `y`, `dx`, and `dy` properties.
* The `end` event is not dispatched if no movement occurs.
* An `off` function is available that unbinds the drag's internal event handlers.
* Delegation is supported via the `delegate` function.
2012-12-21 12:10:43 -08:00
John Firebaugh
ab733f3de0 Test/fix inspector 2012-12-18 14:48:24 -08:00
John Firebaugh
b134e95dbc Disable spec failing on Travis until I can debug it 2012-12-18 12:39:45 -08:00
John Firebaugh
d66915e356 Update mocha and include mocha-phantomjs fix
Fixes #289, see:
https://github.com/metaskills/mocha-phantomjs/pull/30
https://github.com/visionmedia/mocha/pull/691
2012-12-15 09:37:06 -08:00
John Firebaugh
e627616603 Fix float comparison 2012-12-15 09:37:06 -08:00
John Firebaugh
ad0efa4931 Place -> Point
We decided to use geometric terms for the modes.
2012-12-14 14:39:38 -08:00
John Firebaugh
209b87f7e8 Extract MoveWay action 2012-12-13 17:39:07 -08:00
John Firebaugh
ee3f5cc768 Move -> MoveNode, in preparation for MoveWay 2012-12-13 17:39:07 -08:00
John Firebaugh
c37aa11408 Start testing modes 2012-12-13 17:39:06 -08:00
John Firebaugh
d192d8bed5 Smaller test data 2012-12-13 17:39:06 -08:00
John Firebaugh
c5dbebc063 Move keybinding to map 2012-12-13 17:39:06 -08:00
Tom MacWright
8e14a9a13c Refactor geocoder into ui component, refactor clickoutside technique.
Fixes #251
2012-12-13 14:18:49 -05:00
Tom MacWright
9c0633d674 Update extent tests 2012-12-13 12:07:46 -05:00
Tom MacWright
d7f094a024 Remove 404 test because Travis can't handle it. 2012-12-13 12:06:47 -05:00
Tom MacWright
52d9227232 Rename add road to add line. Fixes #252 2012-12-13 12:06:12 -05:00
Tom MacWright
6b257d0d85 Update test for UI tweaks 2012-12-08 00:02:36 -05:00
Tom MacWright
01e696135d Test for travis 2012-12-07 18:20:14 -05:00
Tom MacWright
50ef08c723 Test actual data parsing, add test data, more tests 2012-12-07 18:03:33 -05:00
Tom MacWright
adb8ab53ce Update relation tests 2012-12-07 16:01:14 -05:00
John Firebaugh
d4832e2e95 Add closing segment of drawn areas (fixes #217) 2012-12-07 14:21:30 -05:00
John Firebaugh
c5c65ccdfd Include difference in history change events 2012-12-07 12:35:57 -05:00
John Firebaugh
ea4b93d88b Graph#difference 2012-12-07 12:35:57 -05:00
John Firebaugh
255e3aaabd Modify Graph so it can track deleted ids 2012-12-07 12:32:24 -05:00
John Firebaugh
3e45afbc5e Move history annotation to History#perform/replace
Actions are too low-level for annotations.
2012-12-07 10:35:39 -05:00
John Firebaugh
7eec007740 Get internal ID logic in one place 2012-12-07 10:32:51 -05:00