Commit Graph

357 Commits

Author SHA1 Message Date
John Firebaugh
639f1b6977 Stub in splash screen (#567) 2013-01-30 16:44:27 -05:00
John Firebaugh
e381b6ab26 Extract AddMidpoint action 2013-01-30 15:47:33 -05:00
John Firebaugh
459dc00ce5 Change the midpoint data a bit
Store the ways which share the segment and the index of
the segment. This will be used in both DragWay and Draw
behaviors.
2013-01-30 15:47:33 -05:00
John Firebaugh
6576ec6501 Operation sprites 2013-01-30 11:56:49 -05:00
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
de7fad5803 Move remaining XML stuff to Connection 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
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
Ansis Brammanis
8b43094566 Fix tests 2013-01-23 16:34:23 -05:00
John Firebaugh
d6d1709e7b Trying out radial menus for operations UI (#226) 2013-01-23 15:34:04 -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
29d608970b UnjoinNode action (fixes #442) 2013-01-23 10:07:10 -05:00
John Firebaugh
ff15aa8e7b Rewrite d3.keybinding
A keybinding now represents a set of key commands that can
be unbound as a set. Multiple keybindings are possible, and,
providing a namespace is provided to the constructor, will
not conflict with each other.

Also, key combination strings such as ⌘+A are now supported.
2013-01-22 14:55:08 -05:00
John Firebaugh
2ee07a3b74 Add iD.actions.AddRelationMember 2013-01-18 14:44:29 -08:00
John Firebaugh
3eaf4a46e0 Add CSS classes for relation memberships
An entity that is a member of a relation will have the classes
`member`, `member-role-<member role>`, and `member-type-<relation type>`.

The first use of these classes is to avoid filling multipolygon
member areas.
2013-01-17 15:17:40 -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
John Firebaugh
9a76b81125 First cut on multipolygon rendering 2013-01-17 11:57:30 -08:00
John Firebaugh
e24b22b518 Extract iD.svg.LineString 2013-01-17 11:57:29 -08:00
Tom MacWright
1a81a8508a Fix mocha globals for window event listener 2013-01-17 13:21:03 -05:00
Tom MacWright
f66535f068 Fix tests 2013-01-17 13:14:46 -05:00
Tom MacWright
8def2e0999 Remove style and references to it 2013-01-16 13:07:30 -05:00
Tom MacWright
4808a8ec9d Improve test coverage of ui elements 2013-01-16 12:29:59 -05:00
Tom MacWright
72afc6dcb9 Namespace UI components 2013-01-14 14:00:51 -05:00
John Firebaugh
4c6757714c parentWays/Relations now take an entity 2013-01-11 17:26:25 -08:00
John Firebaugh
acaaab5dc9 Extract iD.svg.Surface 2013-01-11 16:01:39 -08:00
John Firebaugh
45fd260d8f Add basic Area test 2013-01-11 15:49:56 -08:00
John Firebaugh
7dc1945ee3 accuracy-handle -> midpoint 2013-01-11 14:54:51 -08:00
John Firebaugh
e95d163dbc Apply tag classes to vertices and points
While here, introduce a `classed` matcher for Chai.
2013-01-11 12:22:23 -08:00
John Firebaugh
577398ca21 Fix .shared classing
Now that Graph#parentWays is cached, the specialized Graph#parentStructure
method is no longer necessary.

This commit also demonstrates that it's relatively easy to write specs for
rendering now!
2013-01-11 11:56:37 -08:00
John Firebaugh
b8310e2d9f Move to iD.svg.TagClasses 2013-01-11 11:56:37 -08:00
John Firebaugh
809b73599c Merge points code into iD.svg.Points 2013-01-11 07:49:26 -08:00
John Firebaugh
6aa43f44d0 Split map rendering into some components 2013-01-11 07:04:40 -08:00
John Firebaugh
1e7e874ad7 Remove jsonp test reference 2013-01-10 21:08:34 -08:00
John Firebaugh
d5fbe32b1d Remove d3.jsonp (only wiki.js used it) 2013-01-10 21:00:24 -08:00
John Firebaugh
cddef8d7c8 Remove deleted and duplicated script includes 2013-01-10 19:43:22 -08:00
Tom MacWright
3b5f6dd8bd Support images from the wiki, adds d3.jsonp extension. 2013-01-09 11:31:53 -05:00
Tom MacWright
a293691643 Move taginfo into service 2013-01-09 10:29:42 -05: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
John Firebaugh
2d3ce6c125 Extract hover behavior 2013-01-07 08:34:37 -08:00
John Firebaugh
4a7bd26be8 Add 'Add Tag' button (#314), needs style
Fixes #281.
2013-01-03 23:16:34 -08:00
John Firebaugh
3ffa8066c5 Taginfo typeahead on keys as well as values 2013-01-01 18:43:22 -08:00
John Firebaugh
c927ff5b5d Rationalize vocabulary
- nodes
  - vertices
  - points
- ways
  - lines
  - areas
2012-12-29 09:18:05 -08:00
John Firebaugh
f7dfda46b2 Move Entity subclasses to separate files 2012-12-28 22:17:09 -08:00