Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data layer refactor #3001

Merged
merged 15 commits into from
Feb 28, 2016
Merged

Data layer refactor #3001

merged 15 commits into from
Feb 28, 2016

Conversation

bhousel
Copy link
Member

@bhousel bhousel commented Feb 25, 2016

This primarily addresses #2994 but also eliminates bunch of accumulated technical debt.

  • iD.svg.Surface is now iD.svg.Layers and provides access to whatever vector layers we want to draw on top of the raster tiles.
  • layers can be dynamically added or removed, or I suppose reordered if you want to get crazy.
  • iD.Background now draws just the background and nothing else

Why now?
Because Mapillary proved how useful it is to draw data layers on top of the OSM data, and we want anyone else to be able to do that cleanly (not by hacking up iD.Background). Next stop: OSM notes.

As simple as shuffling some layers around seems, this is in fact a big nasty refactor, but I'm feeling ok about it. I'm going to do a bunch of editing with it tonight and see if anything else is terribly broken.

There are a few other low hanging performance/usability things I'll probably sneak in:

  • The turn restrictions editor should go away when it's not visible. Or at least, stop listening to history change and mousemove events and redrawing to its secret svg surface. a866856
  • When dragging POI markers, they jump slightly when you start to drag them. So we probably need to adjust the drag origin so that it matches the pointy part of the marker, not the center. Just realized this is broken in master, not something I broke in the refactor, so tracking on a new issue Improve Dragging Vertices and POI markers #3003
  • Make sure radial menu position gets updated immediately goes away when resetting the surface transform. It currently does a funny thing: dragging makes the menu transition away, but if you do a quick drag and the surface has time to redraw, you can see it flicker to the wrong place just before it disappears. 34901d1

bhousel added a commit that referenced this pull request Feb 28, 2016
@bhousel bhousel merged commit 4a93977 into master Feb 28, 2016
@bhousel bhousel deleted the data-layer-refactor2 branch February 28, 2016 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant