Mercurial > gemma
diff client/src/application/Topbar.vue @ 1119:6d4cc4389c8f store-refactoring
merged default into store-refactoring
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 06 Nov 2018 09:12:05 +0100 |
parents | 595654ad3f66 ef7c102497b8 |
children | d9e6a1f6f394 |
line wrap: on
line diff
--- a/client/src/application/Topbar.vue Tue Nov 06 08:18:03 2018 +0100 +++ b/client/src/application/Topbar.vue Tue Nov 06 09:12:05 2018 +0100 @@ -213,10 +213,13 @@ if (resultEntry.geom.type == "Point") { let view = this.openLayersMap.getView(); const currentZoom = view.getZoom(); - const newZoom = - resultEntry.type === "bottleneck" - ? Math.max(17, currentZoom) - : Math.max(15, currentZoom); + let newZoom = 11; + if (resultEntry.type === "bottleneck") + newZoom = Math.max(17, currentZoom); + if (resultEntry.type === "rhm") + newZoom = Math.max(15, currentZoom); + if (resultEntry.type === "city") + newZoom = Math.max(13, currentZoom); view.animate( { zoom: newZoom,