Commit Graph

70 Commits

Author SHA1 Message Date
John Firebaugh
9502729f5e Optimize presets.match
Previous implementation was linear in the number of
presets. This should be near constant time.
2013-05-13 21:07:26 -07:00
John Firebaugh
fd1573fa08 Abandon iD.svg.MemberClasses
Substantial performance hit for something that's barely used.
2013-05-13 12:46:01 -07:00
John Firebaugh
0ae54abdcc Extract iD.actions.DiscardTags 2013-05-13 09:26:41 -07:00
John Firebaugh
d247962324 Handle incomplete relations in simpleMultipolygonOuterMember 2013-05-01 10:28:40 -07:00
John Firebaugh
aedd5ee46e Create a dist directory
This directory will contain the built sources (iD.js, iD.css)
and images. On a release branch, we will check in the generated
files. For the osm.us/master deploy, it should run make and use
dist/ as the root.

Paths in css are relative, e.g. url(img/foo.png).
2013-04-22 10:50:36 -07:00
John Firebaugh
dca9bec450 Move Connection to core 2013-04-17 17:35:34 -07:00
John Firebaugh
687b7516d6 Split locales into individual files
This avoids a fragile regexp for the en special case.
2013-04-06 18:26:37 -07:00
John Firebaugh
e950042922 Fix cursors, add tests 2013-04-05 11:57:13 -07:00
John Firebaugh
f3caa77057 Manage rest of test libs with npm 2013-04-04 10:48:13 -07:00
John Firebaugh
d72ede2e2d Update to mocha 1.9, manage with npm 2013-04-04 10:36:11 -07:00
John Firebaugh
55a9d74553 Fix up Taglist test 2013-03-17 19:44:32 -07:00
John Firebaugh
113ae58de8 Fix up tests 2013-03-11 15:45:27 -07:00
John Firebaugh
2c874545eb Fix tests 2013-03-10 20:08:18 -07:00
John Firebaugh
da902061d6 Fix tests 2013-03-08 20:37:19 -08:00
John Firebaugh
d60ec2bd8e Sync tests 2013-03-06 16:16:12 -08:00
John Firebaugh
78f6a00029 Fix moving multiple entities which share nodes
While here, implement moving multipolygons too.
2013-02-27 17:12:39 -08:00
Tom MacWright
61d7ec45b5 Banish function ( style 2013-02-12 16:35:47 -05:00
John Firebaugh
502f35869c Fall back to en strings (fixes #738) 2013-02-12 10:40:41 -08:00
John Firebaugh
843baa11c0 graph -> core
This matches how it's described in ARCHITECTURE.md.
2013-02-09 15:18:54 -08:00
John Firebaugh
e05531ad6c Fix circularize boundary cases (fixes #494)
There are still more boundary cases even farther out. But this is
probably sufficient for the real world.
2013-02-08 12:08:48 -08:00
John Firebaugh
104b02eda1 Move common setup to spec_helpers.js 2013-02-06 14:04:19 -08:00
John Firebaugh
bd8c9d6a00 Support merging points into an area (#435) 2013-02-06 13:42:34 -08: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
c9fb1444db Connect via drag and drop
Fixes #598.
2013-02-04 16:48:54 -08: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
a8410be6eb iD.actions.Join 2013-02-01 17:31:32 -05:00
John Firebaugh
9120f33aa7 ReverseWay -> Reverse 2013-02-01 17:31:32 -05:00
John Firebaugh
c86792a77b SplitWay -> Split 2013-02-01 17:31:32 -05:00
John Firebaugh
e1d5a0cb03 Unjoin -> Disconnect 2013-02-01 17:31:32 -05:00
John Firebaugh
58fcf746a2 Delete multiple 2013-02-01 15:08:41 -05:00
John Firebaugh
7ba31f05d2 Support deleting relations 2013-02-01 14:48:11 -05:00
John Firebaugh
3da0e70c0f Shift-selection 2013-02-01 14:31:47 -05:00
John Firebaugh
7e68e8e114 Add iD.Context
This is a facade interface that ties together a bunch of
different internal objects and will make it easier to write
tests for behaviors, modes, and operations.
2013-02-01 12:40:15 -05:00
John Firebaugh
bbccec75be Convert Hash to a behavior 2013-01-31 18:28:24 -05:00
John Firebaugh
3605895dfa ChangeEntityTags -> ChangeTags 2013-01-31 12:41:29 -05:00
John Firebaugh
6f7079d11c AddWay/AddNode -> AddEntity 2013-01-31 12:06:21 -05:00
John Firebaugh
208ed6a2ed Move iD.geo tests to own file 2013-01-31 08:30:46 -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
13e7d03395 Fix build 2013-01-29 19:02:34 -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
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
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
2ee07a3b74 Add iD.actions.AddRelationMember 2013-01-18 14:44:29 -08:00
John Firebaugh
d40c645170 Fix packaged tests 2013-01-17 16:32:50 -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