Commit Graph

315 Commits

Author SHA1 Message Date
Tom MacWright 0fafa340fe Start using d3 3.1.0
Update d3, use streams, d3.set, clip
Use clipping, fix side effects
2013-03-07 17:45:16 -05:00
Tom MacWright ca74b111b0 Fix highlighting of layers and geocoding
* Fix highlighting of custom layer. Fixes #915
* Line up tabindexes. Fixes #922
2013-03-07 15:32:03 -05:00
John Firebaugh 84a4f9e5d2 Eliminate iD.layers 2013-03-06 15:51:16 -08:00
John Firebaugh 7cdfa8daf3 Remove duplicated code 2013-03-06 15:51:16 -08:00
Ansis Brammanis 32a78d4573 let centerEase be stopped by dragging 2013-03-06 14:42:56 -05:00
Ansis Brammanis 8fc4cffd20 Revert "shorter wait before redrawing after zooming"
This reverts commit 7a22e62426.
2013-03-06 13:12:46 -05:00
Ansis Brammanis f8f86e7a42 Avoid style recalculation in resetTransform 2013-03-06 12:11:46 -05:00
Ansis Brammanis 7a22e62426 shorter wait before redrawing after zooming
Feels a lot snappier.
Slightly longer delay when panning.
2013-03-06 12:04:41 -05:00
John Firebaugh c36b2c9269 Avoid changing tile positions in the load/error callbacks
Fixes #644
2013-03-05 16:19:04 -08:00
John Firebaugh 9f85daaffc Simplify 2013-03-05 16:08:37 -08:00
John Firebaugh a84d60f36d Clear cache when changing source 2013-03-05 16:08:37 -08:00
John Firebaugh 50de147fb0 Camel case 2013-03-05 16:08:37 -08:00
John Firebaugh 98589408bd Remove unused 2013-03-05 16:04:17 -08:00
John Firebaugh 5b5f3fe2e5 Use consistent selection argument style 2013-03-05 16:02:27 -08:00
John Firebaugh 417e21ab05 Remove unused 2013-03-05 16:02:27 -08:00
Tom MacWright e071c15579 Remove unused variables and arguments 2013-03-05 16:29:23 -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
Ansis Brammanis 478696a189 Offsets are now relative to zoom level 2013-02-28 15:57:37 -05:00
Ansis Brammanis 0090920d41 maintain center when map resized 2013-02-28 14:35:33 -05:00
Ansis Brammanis 4081d1234e set centerzoom before drawing map 2013-02-28 13:12:00 -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
John Firebaugh 571edc707d d3.tail -> iD.ui.Tail 2013-02-27 17:55:23 -08:00
John Firebaugh e154a94ef0 Draw only visible midpoints (#804) 2013-02-17 11:27:36 -08:00
Ansis Brammanis 147fce1f49 Merge branch 'tree-intersects'
Conflicts:
	js/id/behavior/lasso.js
2013-02-15 13:40:01 -05:00
Ansis Brammanis 7102fea04d add history.intersects to context 2013-02-13 18:12:53 -05:00
Tom MacWright b8c79b8b48 Fix map.extent 2013-02-13 18:12:38 -05:00
Tom MacWright eb2a133ac6 Hate multiline bracketless ifs 2013-02-13 17:57:58 -05:00
Ansis Brammanis e60c9ab16b Fix zoom limitation while drawing 2013-02-13 17:31:23 -05:00
John Firebaugh 3be61a65e6 Manual redraw debouncing
This avoids a duplicate full redraw at the end of a drag pan. The
redraw triggered by mouseup.zoom now cancels the pending debounced
redraw.

Also, bump the debounce interval to 300ms, which helps avoid full
redraws during scroll zoom, making it more responsive.
2013-02-13 14:27:01 -08:00
Tom MacWright 8538339b44 Fix zooming to validated features. Fixes #748 2013-02-13 17:21:21 -05:00
John Firebaugh a53e604b5b Avoid unnecessary style recalculation 2013-02-13 11:57:32 -08:00
John Firebaugh 65fbc808a1 Map#pan redraws 2013-02-13 10:39:48 -08:00
Ansis Brammanis 529b570c89 Merge remote-tracking branch 'systemed/master' into tree-intersects 2013-02-13 13:31:11 -05:00
Ansis Brammanis 2f15b0ffca Use tree intersects instead of graph.intersects 2013-02-12 17:38:15 -05:00
Tom MacWright 61d7ec45b5 Banish function ( style 2013-02-12 16:35:47 -05:00
Ansis Brammanis 7554c7445d Fix typo triggering too many redraws 2013-02-12 15:34:26 -05:00
Tom MacWright d9b5816530 Store background setting in hash. Fixes #632 2013-02-09 17:34:44 -05:00
Tom MacWright 5139de969e Slow-remove tiles, pay attention to parentNode, refs #686 2013-02-08 13:48:51 -05:00
Tom MacWright 8d8ec84316 Fix inadverted .remove call. Fixes #686 2013-02-08 13:40:57 -05:00
Tom MacWright 2e8e7ad1cc Use css transitions for tiles 2013-02-08 11:20:11 -05:00
Tom MacWright a773aaaab4 Improve perf with some benchmarking.
Re translate change see http://jsperf.com/coerce-vs-join-array
2013-02-07 22:55:44 -05:00
Ansis Brammanis 0804da824a Fix background test 2013-02-07 18:41:17 -05:00
Ansis Brammanis 28c541067b Fix #680, fix use of imagery scaleExtents 2013-02-07 17:58:28 -05:00
Ansis Brammanis ec065dca4c Fix flashing, reset transform on mouseup 2013-02-07 17:18:44 -05:00
Ansis Brammanis ec152716fb Fix calls to ui.flash 2013-02-07 01:16:51 -05:00
Tom MacWright c84e0713d9 Merge branch 'master' into dynamic-layers
Conflicts:
	js/id/renderer/background_source.js
	js/id/ui/layerswitcher.js
2013-02-06 17:39:55 -05:00
Tom MacWright e868c071ac Remove more unreliable or slow layers, select the right layer initially,
fix null tooltips
2013-02-06 17:16:00 -05:00
Ansis Brammanis 83224d0f87 imagery_used includes full custom template 2013-02-06 15:38:20 -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