Commit Graph

30 Commits

Author SHA1 Message Date
John Firebaugh
6941d1914b Perfect oneway markers 2013-04-26 17:33:01 -07:00
John Firebaugh
78aee5b6aa Fix tests 2013-04-23 20:09:36 -07:00
John Firebaugh
77ce20c8c1 Add configurable image path 2013-04-16 17:20:21 -07:00
John Firebaugh
944f44defd Really fix spec 2013-03-13 17:45:16 -07:00
John Firebaugh
71897a53cd Fix spec 2013-03-13 17:42:16 -07:00
John Firebaugh
3787185182 Rendering tagged points
At z16 and below, tagged points are rendered with a small
dot in the center. At z17 and above, they are rendered with
a maki icon.

See the test rendering page for examples.

Fixes #381.
2013-03-13 17:31:25 -07:00
John Firebaugh
da902061d6 Fix tests 2013-03-08 20:37:19 -08:00
Tom MacWright
3e69ef6f9e Fix tests and global leak 2013-03-07 17:53:36 -05:00
Tom MacWright
1228155551 Fix tests
Way lines are no longer the only paths on the map, so we need to be more
specific.
2013-03-07 15:31:26 -05:00
John Firebaugh
98d1ee4f10 Fix rendering of multipolygons with the tags on the outer way
From the wiki:

> If you have one closed way making up the outer ring and it does not
> describe something in its own right, you may also put these tags on
> the outer ring and leave the relation untagged.

During line and area rendering, fix up such ways so that they are
rendered as if the tags were on the relation instead.

Fixes #613.
2013-03-06 13:22:43 -08:00
John Firebaugh
8aaa91d96f Fix tests 2013-03-04 08:00:12 -08:00
John Firebaugh
56a3edcf7f Fix tests
Disabling translation test, it's just too painful
2013-02-27 20:47:49 -08:00
Ansis Brammanis
dfeff7e00d Fix svg midpoint tests 2013-02-18 18:38:01 -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
Ansis Brammanis
d3d0851596 Fix svg/midpoint tests
Proper solution waiting on 369
2013-02-05 00:51:54 -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
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
1be596c21b Fix tests 2013-01-24 11:26:57 -05:00
John Firebaugh
2c6e244fb0 Add tests for iD.svg.Lines 2013-01-17 15:17:40 -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
9a76b81125 First cut on multipolygon rendering 2013-01-17 11:57:30 -08:00
John Firebaugh
545789efcc More area tests 2013-01-17 11:57:30 -08:00
John Firebaugh
8564279926 Use identity projection in tests 2013-01-17 11:57:29 -08:00
John Firebaugh
9f1506af5e Always use rounded projection 2013-01-17 11:57:29 -08:00
Tom MacWright
ea3b7baf14 Tag classes no longer changes classes if there is no change. This makes the default, no-class scenario null instead of an empty string 2013-01-12 09:30:11 -05: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
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