# HG changeset patch # User Thomas Junk # Date 1545295049 -3600 # Node ID f034371c5d110a0b51dbd5c4e2a38879cd6f4151 # Parent 0123a120e99947c5f9db380f09bfc4cf4589d8e3 refac: move to map in staging component resolves now via id Currently we observe on some builds (not machines), that the zoom to a specific bottleneck does not work occasionaly. To exclude problems I restrucutred, how the information is resolved and included several assert statements to help hunting down this strange bug. The assert statemants could stay in the code anyways, because the do not do any harm. diff -r 0123a120e999 -r f034371c5d11 client/src/components/staging/StagingDetail.vue --- a/client/src/components/staging/StagingDetail.vue Thu Dec 20 08:42:06 2018 +0100 +++ b/client/src/components/staging/StagingDetail.vue Thu Dec 20 09:37:29 2018 +0100 @@ -85,16 +85,13 @@ v-for="(bottleneck, index) in bottlenecks" :key="index" class="d-flex flex-row" - v-if="show" + v-if="show && bottlenecks.length > 0" >
- {{ bottleneck.properties.objnam }} + {{ + bottleneck.properties.objnam + }}
{ + console.assert(state.openLayersMap, "no Map found"); // inserted during bug hunt let view = state.openLayersMap.getView(); + console.assert(view, "no view found"); // inserted during bug hunt const currentZoom = view.getZoom(); view.animate({ zoom: preventZoomOut ? Math.max(zoom, currentZoom) : zoom,