Commit Graph

45 Commits

Author SHA1 Message Date
Bryan Housel 16ca10708b Fix oneway markers in IE 2015-11-26 01:11:46 -05:00
Bryan Housel 97b189b397 Precreate fixed number of layergroups between -10, 10 2014-06-09 21:20:50 -04:00
Bryan Housel 849363ff8c Group by layer to correctly depth sort lines.. 2014-06-06 16:10:37 -04:00
Bryan Housel cfd2b6a619 Group line parts so that they can be properly depth sorted. 2014-06-02 17:39:51 -04:00
Bryan Housel 5ee391dd52 Better layer sorting to fix z-depth issues.. 2014-05-30 15:20:36 -04: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 6060e886cb Reduce calls to iD.svg.TagClasses
For fills and shadows, style changes can happen only when
a new version of the feature is produced. If we include a
version number in the key, we need only call TagClasses on
the enter selection.

We cannot apply the same optimization for strokes, since
stroke style can depend on the tags of parent relations
as well.
2013-05-13 09:37:48 -07:00
John Firebaugh 1823f2619f Clean up and simplify iD.svg.Lines 2013-05-13 09:37:00 -07:00
John Firebaugh 578224bd63 Optimize hover behavior
Add entity IDs to the element class list, so that specific
elements can be selected by ID rather than needing `filter`.
2013-05-12 09:40:34 -07:00
John Firebaugh d247962324 Handle incomplete relations in simpleMultipolygonOuterMember 2013-05-01 10:28:40 -07:00
Ansis Brammanis 42721f6f44 don't remove oneways during partial redraws
fixes #1394
2013-04-29 10:54:04 -04:00
John Firebaugh 6941d1914b Perfect oneway markers 2013-04-26 17:33:01 -07:00
Ansis Brammanis 4eccd7015f corner destroying resampling for oneway markers 2013-04-25 18:41:49 -04:00
Ansis Brammanis c34f48c207 render tunnels below other lines 2013-03-15 14:18:17 -04:00
Tom MacWright 154a587631 Fine tune marker spacing 2013-03-07 15:31:26 -05:00
Tom MacWright a58df86126 Corner-preserving resampling 2013-03-07 15:31:26 -05:00
Tom MacWright 4c1f292378 Resample oneway paths to produce markers.
This uses a technique created by @mbostock in http://bl.ocks.org/mbostock/4965670
Need to confirm that this is faster. It is definitely cleaner.
2013-03-07 15:31:25 -05:00
Ansis Brammanis 928cade41b oneway markers on rivers and streams 2013-03-06 17:51:31 -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 60a290282c Clip lines with Cohen-Sutherland algorithm
This yields a 10x paint performance increase at
#map=18.88/38.85208/-76.72632, as measured with
Chrome Canary's "Continuous Page Repainting" mode.

Fixes #885.
2013-03-03 18:25:42 -08:00
Tom MacWright 5829438391 Enable advanced uglify compression, remove unused variables 2013-02-27 12:13:59 -05:00
Tom MacWright 61d7ec45b5 Banish function ( style 2013-02-12 16:35:47 -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 7086012b98 Source oneway arrow styles from css 2013-02-05 13:05:12 -05:00
Ansis Brammanis 0cc2d62985 Update onway arrow font size 2013-02-05 12:14:37 -05:00
Saman Bemel-Benrud 5764012b23 better styles for map features. 2013-02-04 19:37:10 -05:00
Ansis Brammanis 7ca6934f8a Fix #580 2013-01-31 16:42:28 -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
Tom MacWright 32ea30c3fb Use isPoi for determining whether points are pois or not 2013-01-23 19:14:54 -05:00
John Firebaugh e5407fa49d Improve highway rendering; render halo in a separate layer 2013-01-19 18:07:39 -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 e24b22b518 Extract iD.svg.LineString 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 199584fbff Name drawing functions so we can profile them 2013-01-16 13:54:36 -05:00
Tom MacWright 6aae64bd62 Add waystack, fix bridge coloring 2013-01-16 13:06:01 -05:00
Tom MacWright e3775844c8 Refactor lines, keep non-scoped fns out of scope 2013-01-16 12:52:06 -05:00
Tom MacWright 87c341d7e0 Fix jshint problems. 2013-01-16 12:39:35 -05:00
Tom MacWright cbe41f16d5 Do not output invalid linestrings. Fixes #360
Though switching back to geo paths with fill this even more.
2013-01-12 01:38:29 -05:00
Ansis Brammanis c894ad26f2 nicer getComputedLength caching 2013-01-11 17:28:04 -05:00
Ansis Brammanis 61533019dd don't recalculate, for real this time 2013-01-11 17:10:25 -05:00
Ansis Brammanis 6b09da380d only getComputedTextLength() once 2013-01-11 16:56:28 -05:00
Ansis Brammanis 7e9eaa6422 fix svg line text 2013-01-11 15:57:28 -05:00
Ansis Brammanis 9251edb02b fix oneway text 2013-01-11 15:46:28 -05:00
John Firebaugh b8310e2d9f Move to iD.svg.TagClasses 2013-01-11 11:56:37 -08:00
John Firebaugh 6aa43f44d0 Split map rendering into some components 2013-01-11 07:04:40 -08:00