show sidewalk corners when zoomed out

This commit is contained in:
Dustin Carlino 2019-01-19 21:19:49 -08:00
parent 4ca6571e2f
commit ae6438e8b7
2 changed files with 12 additions and 8 deletions

View File

@ -13,6 +13,7 @@
- what's correct for 14th and e boston? if we had less lanes there, would it help?
- make the polygons for the merged intersections look better
- the thick road bands for tiny roads totally vanish... is that good?
- same for the sidewalk corners
- make sure the turns are reasonable
- apply the merge automatically somehow

View File

@ -70,18 +70,21 @@ impl Renderable for DrawIntersection {
ctx.canvas
.draw_text_at(g, Text::from_line(format!("{}", idx + 1)), *pt);
}
} else if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS || opts.show_all_detail {
} else {
// Always draw these; otherwise zooming in is very disconcerting.
for corner in &self.sidewalk_corners {
g.draw_polygon(opts.color.unwrap_or_else(|| ctx.cs.get("sidewalk")), corner);
}
if self.intersection_type == IntersectionType::TrafficSignal {
if ctx.hints.suppress_traffic_signal_details != Some(self.id) {
self.draw_traffic_signal(g, ctx);
}
} else {
for crosswalk in &self.crosswalks {
crosswalk.draw(g, ctx.cs.get_def("crosswalk", Color::WHITE));
if ctx.canvas.cam_zoom >= MIN_ZOOM_FOR_MARKINGS || opts.show_all_detail {
if self.intersection_type == IntersectionType::TrafficSignal {
if ctx.hints.suppress_traffic_signal_details != Some(self.id) {
self.draw_traffic_signal(g, ctx);
}
} else {
for crosswalk in &self.crosswalks {
crosswalk.draw(g, ctx.cs.get_def("crosswalk", Color::WHITE));
}
}
}
}