changeset 898:66e2b038d336 geo-style

Merged default into geo-style branch.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 02 Oct 2018 16:05:17 +0200
parents 0a563fef64a9 (current diff) b3c18ced286c (diff)
children 85b2648066d7
files
diffstat 5 files changed, 46 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/application/Morphtool.vue	Tue Oct 02 12:58:20 2018 +0200
+++ b/client/src/application/Morphtool.vue	Tue Oct 02 16:05:17 2018 +0200
@@ -1,49 +1,74 @@
 <template>
     <div v-if="selectedBottleneck || selectedMorph" class="morphcontainer">
-        <div v-if="surveyList" class="ui-element card card-body shadow">
+        <div v-if="surveyList && !drawmode" class="ui-element card card-body shadow">
             <div class="headline">
-                <h5>{{selectedBottleneck.get("objnam")}}</h5>
+                <h4>{{selectedBottleneck.get("objnam")}}</h4>
+                <hr>
+                <div @click="clearSelection" class="float-left ui-element d-flex morphtoolminus">
+                    <i class="fa fa-close morphtoolsminus"></i>
+                </div>
             </div>
             <ul class="list-group surveylist">
                 <li v-for="survey of surveyList.surveys" :key="survey.data_info" class="list-group-item" @click.prevent="selectSurvey(survey)">
                     <a href="#" @click.prevent="">{{survey.date_info}}</a>
                 </li>
             </ul>
-            <div @click="clearSelection" class="float-left ui-element d-flex shadow morphtoolminus">
-                <i class="fa fa-minus morphtoolsminus"></i>
+        </div>
+        <div v-if="selectedMorph" @click="clearSelection" class="ui-element shadow morphtool">
+            <div class="d-flex flex-row justify-content-between">
+                <i class="fa fa-close text-danger"></i>
+                <small>Bottleneck:&nbsp;</small>
+                <h6>{{selectedBottleneck.get("objnam")}}</h6>
             </div>
         </div>
-        <div v-else @click="clearSelection" class="float-right ui-element d-flex shadow morphtool">
-            <i class="fa fa-object-ungroup"></i>
-        </div>
     </div>
 </template>
 
-<style lang="scss">
-.morphcontainer {
-  position: relative;
-  margin-bottom: $offset;
+<style scoped lang="scss">
+.headline {
+  margin-right: $offset;
   margin-left: $offset;
 }
+.morphcontainer {
+  margin-bottom: $offset;
+  margin-left: auto;
+  margin-right: auto;
+  border-radius: $border-radius;
+}
 .surveylist {
+  text-align: left;
   margin-bottom: $offset !important;
   margin-left: $offset;
   margin-right: $offset;
 }
+
+.surveylist li {
+  margin-left: auto;
+  margin-right: auto;
+  border-style: none;
+  padding-bottom: 0rem;
+}
+
 .morphtool {
   position: relative;
   background-color: white;
   padding: $small-offset;
   border-radius: $border-radius;
   height: $icon-width;
-  width: $icon-height;
   margin-right: $offset;
+  margin-top: auto;
+  margin-bottom: auto;
   z-index: 2;
 }
+
+.morphcontainer i {
+  margin-right: $small-offset;
+}
+
 .morphtoolminus {
   position: absolute;
-  bottom: 0;
-  left: 0;
+  top: 0;
+  right: 0;
   background-color: white;
   padding: $small-offset;
   border-radius: $border-radius;
@@ -74,6 +99,7 @@
         for (let feature of this.identifiedFeatures) {
           let id = feature.getId();
           if (id && id.replace(/[.][^.]*$/, "") === "bottlenecks") {
+            this.$store.commit("mapstore/setSelectedMorph", null);
             return feature;
           }
         }
--- a/client/src/application/Topbar.vue	Tue Oct 02 12:58:20 2018 +0200
+++ b/client/src/application/Topbar.vue	Tue Oct 02 16:05:17 2018 +0200
@@ -18,7 +18,7 @@
                 </ul>
             </div>
         </div>
-        <div v-if="routeName == 'mainview'" class="splitbutton">
+        <div v-if="routeName == 'mainview' && currentProfile.length" class="splitbutton">
             <i @click="splitScreen" class="ui-element splitscreen fa fa-window-restore shadow"></i>
         </div>
         <div class="">
--- a/client/src/fairway/store.js	Tue Oct 02 12:58:20 2018 +0200
+++ b/client/src/fairway/store.js	Tue Oct 02 16:05:17 2018 +0200
@@ -10,10 +10,7 @@
     minAlt: 0,
     maxAlt: 0,
     currentProfile: [],
-    waterLevels: [
-      { year: "2016", level: DEMOLEVEL, color: "#005DFF" },
-      { year: "2017", level: 147.2, color: "#639CFF" }
-    ],
+    waterLevels: [{ year: "2016", level: DEMOLEVEL, color: "#005DFF" }],
     selectedWaterLevel: DEMOLEVEL,
     fairwayCoordinates: [],
     startPoint: null,
--- a/client/src/layers/Identify.vue	Tue Oct 02 12:58:20 2018 +0200
+++ b/client/src/layers/Identify.vue	Tue Oct 02 16:05:17 2018 +0200
@@ -37,7 +37,7 @@
 <style lang="scss">
 .features {
   height: $identify-height;
-  overflow-y: scroll;
+  overflow-y: auto;
   margin-bottom: $x-large-offset + $large-offset;
 }
 .versioninfo {
--- a/pkg/models/cross.go	Tue Oct 02 12:58:20 2018 +0200
+++ b/pkg/models/cross.go	Tue Oct 02 16:05:17 2018 +0200
@@ -346,6 +346,9 @@
 }
 
 func (mls *GeoJSONMultiLineCoordinatesZ) Scan(src interface{}) error {
+	if src == nil {
+		return nil
+	}
 	data, ok := src.([]byte)
 	if !ok {
 		return errNoByteSlice