adjust the debug_areas stuff when unzoomed

This commit is contained in:
Dustin Carlino 2019-02-18 18:49:03 -08:00
parent e4e07e7ba6
commit af59307c71
4 changed files with 25 additions and 4 deletions

View File

@ -45,6 +45,9 @@
- population
- http://seattlecitygis.maps.arcgis.com/apps/MapSeries/index.html?appid=3eb44a4fdf9a4fff9e1c105cd5e7fe27
- https://data.seattle.gov/Permitting/Rental-Property-Registration-Map/5a7u-vxx7
- https://www.seattle.gov/transportation/document-library/reports-and-studies
- https://commuteseattle.com/wp-content/uploads/2017/02/2016-Mode-Split-Report-FINAL.pdf
- https://www.soundtransit.org/get-to-know-us/documents-reports/service-planning-ridership
- http://guides.lib.uw.edu/research/gis/uw-lib_data has cool stuff, but .lyr??
## Low-priority geometry issues

View File

@ -148,3 +148,8 @@ offset by some amount...
What if we measured distance over time of this using the current sim? And then
found a low speed that produced the same distance in the same time?
### Gluing together traversables
When we "lookahead", now we just have to call maybe_follow against a single
vehicle. Need an easy way to indicate relative distance behind them.

View File

@ -21,6 +21,7 @@
- Socrata
- http://transportationcamp.org/
- https://www.seattle.gov/transportation/projects-and-programs/programs/neighborhood-street-fund / https://www.seattle.gov/neighborhoods/programs-and-services/your-voice-your-choice
- https://commuteseattle.com/
## Similar projects

View File

@ -268,10 +268,7 @@ impl<S: UIState> GUI<RenderingHints> for UI<S> {
g.clear(state.cs.get("map background"));
}
if g.canvas.cam_zoom < MIN_ZOOM_FOR_DETAIL
&& !screencap
&& !state.primary.current_flags.debug_areas
{
if g.canvas.cam_zoom < MIN_ZOOM_FOR_DETAIL && !screencap {
// Unzoomed mode
if state.layers.show_areas {
g.redraw(&state.primary.draw_map.draw_all_areas);
@ -288,6 +285,21 @@ impl<S: UIState> GUI<RenderingHints> for UI<S> {
if state.layers.show_buildings {
g.redraw(&state.primary.draw_map.draw_all_buildings);
}
// Still show area selection when zoomed out.
if state.primary.current_flags.debug_areas {
if let Some(ID::Area(id)) = state.primary.current_selection {
state.primary.draw_map.get_a(id).draw(
g,
RenderOptions {
color: state.color_obj(ID::Area(id), &ctx),
debug_mode: state.layers.debug_mode,
is_selected: true,
},
&ctx,
);
}
}
} else {
let mut cache = state.primary.draw_map.agents.borrow_mut();
let objects =