Commit Graph

113 Commits

Author SHA1 Message Date
Tom MacWright fefdecfa67 Corner-preserving resampling 2013-03-07 14:16:08 -05:00
Tom MacWright 27c0edb2c1 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-06 21:08:50 -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
Ansis Brammanis 116e03c6d6 tweak point label halo 2013-03-06 14:22:52 -05:00
Tom MacWright 71a4c5a383 Fix jshint errors - plz do not use unnecessary magic 2013-03-04 12:08:54 -05: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
John Firebaugh 787e76dbd1 Fix snapping after moving (fixes #880) 2013-03-01 10:41:55 -08:00
Ansis Brammanis baa9dc6e5e Render unclosed areas correctly 2013-02-28 14:08:03 -05:00
John Firebaugh b7894ceaf0 Calculate participating ways in AddMidpoint
Due to differenced redraw, midpoint.ways was getting stale,
so sometimes dragging a midpoint didn't add the new node to
all ways. Better to calculate participating ways when needed.
This also simplifies the code for adding a midpoint via double
click. It does make filtering midpoints on redraw a bit more
expensive, but a cursory profile didn't show it being a problem.

Fixes #763.
2013-02-27 20:41:38 -08:00
Tom MacWright 5829438391 Enable advanced uglify compression, remove unused variables 2013-02-27 12:13:59 -05:00
John Firebaugh e154a94ef0 Draw only visible midpoints (#804) 2013-02-17 11:27:36 -08:00
Tom MacWright 61d7ec45b5 Banish function ( style 2013-02-12 16:35:47 -05:00
John Firebaugh cca9c30b32 Fix midpoint hover (fixes #728) 2013-02-12 10:51:19 -08:00
Ansis Brammanis 97ab739f1b Update bound data for all elements of points, vertices 2013-02-11 11:00:45 -05:00
Ansis Brammanis f4a6edb224 Localize labels 2013-02-08 18:25:39 -05:00
Tom MacWright 0b89df063f Optimize resetting opacity 2013-02-08 11:02:23 -05:00
Tom MacWright bd615fb19f Cache mousePosition 2013-02-08 10:48:00 -05:00
Tom MacWright 20e1181b7a Use a trueObj for filtering labels, add fastMouse 2013-02-08 10:08:30 -05:00
John Firebaugh 4dbd8f5efc Fix #634 2013-02-05 16:25:33 -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 72cd6b91fa Relation#multipolygon returns coordinate arrays 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
John Firebaugh c9fb1444db Connect via drag and drop
Fixes #598.
2013-02-04 16:48:54 -08:00
Saman Bemel-Benrud 00da90cf36 Merge branch 'master' of github.com:systemed/iD 2013-02-04 19:37:31 -05:00
Saman Bemel-Benrud 5764012b23 better styles for map features. 2013-02-04 19:37:10 -05:00
Ansis Brammanis ab7c1fa80a Fix midpoint hiding. really 2013-02-04 18:32:16 -05:00
Ansis Brammanis d5937907a4 Hide midpoints without breaking drawing
I always forget d3 works this way.
2013-02-04 17:39:16 -05:00
Ansis Brammanis 7e997af9b8 Hide midpoints when vertices hidden 2013-02-04 17:24:00 -05:00
Ansis Brammanis d0d1a16c0a Fix label halo sizing 2013-02-04 17:04:33 -05:00
Tom MacWright 4ee620cb09 Namespace selectors to iD-owned elements 2013-02-04 12:23:46 -05:00
John Firebaugh 3000bc89ce shadow should be above fill
Makes it much easier to select lines that are within areas.
2013-02-03 08:49:43 -08:00
Ansis Brammanis 9cb0879818 Selecting implicitly sets data 2013-01-31 17:47:24 -05:00
Ansis Brammanis b9d77a8de6 Set data on midpoint circles 2013-01-31 17:44:14 -05:00
Ansis Brammanis 7ca6934f8a Fix #580 2013-01-31 16:42:28 -05:00
Ansis Brammanis 8dcb215fe3 Hide labels on mouseover 2013-01-31 15:40:17 -05:00
Ansis Brammanis 26dfaf8161 Revise label stack 2013-01-31 14:43:41 -05:00
Ansis Brammanis c69345e039 Fix comparisons in subpath 2013-01-31 10:50:14 -05:00
Ansis Brammanis 5c1d3cc18e Preserve label tree between partial redraws 2013-01-31 10:34:57 -05:00
Ansis Brammanis b73d18cbf5 Merge remote-tracking branch 'systemed/master' into graph-perf2 2013-01-30 16:58:44 -05:00
John Firebaugh e4c513ae87 midpoint = true -> type = 'midpoint'
Makes it more consistent with entities.
2013-01-30 16:24:33 -05:00
Ansis Brammanis 2fa48df9a1 Small parentWays, parentRelations perf improvements 2013-01-30 16:09:15 -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
Ansis Brammanis 1d4c04c334 Slightly smarter line label placement 2013-01-28 12:10:25 -05:00
Tom MacWright 50b997599d Fix shared-midpoint dragging. Fixes #432 2013-01-27 16:54:34 -05:00
Ansis Brammanis 62e8d4ed64 Fix area order. Algorithm is direction sensitive 2013-01-27 03:32:05 -05:00
John Firebaugh 269739905a Render areas with separate stroke and fill 2013-01-26 16:43:46 -05:00
Tom MacWright adc302863f jshint please 2013-01-25 17:52:09 -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