dont switch buildings while panning (#401)

for #393
This commit is contained in:
Michael Kirk 2020-11-21 14:58:22 -08:00 committed by GitHub
parent d2cead2a82
commit 32a9915d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ impl State<App> for Viewer {
self.hovering_on_bldg.as_ref().map(|h| ID::Building(h.id));
}
if ctx.input.left_mouse_button_pressed() {
if ctx.normal_left_click() {
if let Some(ref hover) = self.hovering_on_bldg {
let start = app.primary.map.get_b(hover.id);
self.isochrone = Isochrone::new(ctx, app, start.id, self.isochrone.constraints);