changeset 1202:68fb4af05b73

fix: prevent identify tool from jumping during page load In order to prevent jumping search embedded in spacer div with 100% size.
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 19 Nov 2018 10:09:25 +0100
parents 37889ae85133
children 49eead4fad3a
files client/src/App.vue client/src/application/Search.vue client/src/identify/Identify.vue
diffstat 3 files changed, 24 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/App.vue	Mon Nov 19 09:09:27 2018 +0100
+++ b/client/src/App.vue	Mon Nov 19 10:09:25 2018 +0100
@@ -6,7 +6,9 @@
                     <Sidebar :routeName="routeName"></Sidebar>
                     <Bottlenecks v-if="routeName == 'mainview'"></Bottlenecks>
                     <Imports v-if="routeName == 'mainview'"></Imports>
-                    <Search v-if="routeName == 'mainview'"></Search>
+                    <div class="full">
+                        <Search v-if="routeName == 'mainview'"></Search>
+                    </div>
                     <Layers v-if="routeName == 'mainview'"></Layers>
                     <Identify v-if="routeName == 'mainview'"></Identify>
                 </div>
@@ -28,6 +30,7 @@
 <style lang="sass" scoped>
 .topcontainer
   height: 10vh
+  position: relative
 
 .bottomcontainer
   height: 10vh
@@ -54,6 +57,9 @@
   -moz-osx-font-smoothing: grayscale
   text-align: center
   color: #2c3e50
+
+.full 
+  width: 100%
 </style>
 
 <script>
--- a/client/src/application/Search.vue	Mon Nov 19 09:09:27 2018 +0100
+++ b/client/src/application/Search.vue	Mon Nov 19 10:09:25 2018 +0100
@@ -25,6 +25,7 @@
 
 <style lang="sass" scoped>
   .searchcontainer
+    left: $small-offset
     height: $icon-height
     border-radius: 0.25rem
 
--- a/client/src/identify/Identify.vue	Mon Nov 19 09:09:27 2018 +0100
+++ b/client/src/identify/Identify.vue	Mon Nov 19 10:09:25 2018 +0100
@@ -1,6 +1,9 @@
 <template>
     <div class="identifymenu">
-        <div @click="$store.commit('application/showIdentify', !showIdentify)" class="d-flex flex-column ui-element minimizer">
+        <div
+            @click="$store.commit('application/showIdentify', !showIdentify)"
+            class="d-flex flex-column ui-element minimizer"
+        >
             <div :class="infoStyle">
                 <i class="fa fa-info"></i>
             </div>
@@ -13,26 +16,28 @@
                 <hr>
                 <div class="d-flex flex-column features">
                     <small v-if="currentMeasurement">
-                      {{ currentMeasurement.quantity }}
-                      ({{ currentMeasurement.unitSymbol }}):
-                      {{ currentMeasurement.value }}
+                        {{ currentMeasurement.quantity }}
+                        ({{ currentMeasurement.unitSymbol }}):
+                        {{ currentMeasurement.value }}
                     </small>
                     <div v-for="feature of identifiedFeatures" :key="feature.getId()">
                         <div v-if="feature.getId()">
                             {{ feature.getId().replace(/[.][^.]*$/,"") /* cut away everything from the last . to the end */}}:
-                            <small v-for="(value, key) in prepareProperties(feature)" :key="key">
+                            <small
+                                v-for="(value, key) in prepareProperties(feature)"
+                                :key="key"
+                            >
                                 <div v-if="value">{{key}}:{{value}}</div>
                             </small>
                         </div>
                     </div>
                 </div>
                 <div class="versioninfo">
-                    <hr />
-                    gemma <a href="https://hg.intevation.de/gemma/file/tip">source-code</a> {{ versionStr }}
-                    <br />
-                    Some data ©
-                    <a href="https://www.openstreetmap.org/copyright">OpenSteetMap</a> contributors
-
+                    <hr>gemma
+                    <a href="https://hg.intevation.de/gemma/file/tip">source-code</a>
+                    {{ versionStr }}
+                    <br>Some data ©
+                    <a href="https://www.openstreetmap.org/copyright">OpenSteetMap</a>contributors
                 </div>
             </div>
         </div>