view client/src/App.vue @ 1140:2e06bc53b002

separating line/polygon/cut tools in UI Measurements can now be made while a bottleneck and sounding data is selected. The open layers interaction object(s) are now in the vuex store to disable them from other components (Morphtool.vue). Line and Polygon are now to separate buttons.
author Markus Kottlaender <markus@intevation.de>
date Mon, 12 Nov 2018 14:45:07 +0100
parents 2fda33d55d81
children 2d34715dd52e 74e180ad3d6b
line wrap: on
line source

<template>
    <div id="app" class="main">
        <div v-if="isAuthenticated" class="d-flex flex-column userinterface">
            <div class="topcontainer">
                <Topbar :routeName="routeName"></Topbar>
            </div>
            <div class="midcontainer d-flex flex-row">
                <div class="leftcontainer">
                    <Sidebar :routeName="routeName"></Sidebar>
                    <Bottlenecks v-if="routeName == 'mainview'"></Bottlenecks>
                </div>
                <div class="middle"></div>
                <div class="rightcontainer"></div>
            </div>
            <div class="bottomcontainer d-flex flex-row align-items-end">
                <Userbar></Userbar>
                <Morphtool v-if="routeName == 'mainview'"></Morphtool>
                <Pdftool v-if="routeName == 'mainview'"></Pdftool>
                <Drawtool v-if="routeName == 'mainview'"></Drawtool>
            </div>
            <Zoom v-if="routeName == 'mainview'"></Zoom>
        </div>
        <div class="d-flex flex-column">
            <router-view/>
        </div>
    </div>
</template>

<style lang="scss" scoped>
html {
  height: 100%;
  width: 100%;
  margin: 0 auto;
}
body {
  height: 100%;
  width: 100%;
  background-color: #efefef !important;
}

.topcontainer {
  height: 10vh;
}

.bottomcontainer {
  height: 10vh;
}

.midcontainer {
  height: 80vh;
}

.rightcontainer {
  width: 20vw;
}

.leftcontainer {
  width: 20vw;
}

.middle {
  width: 60vw;
}

.userinterface {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 4;
  pointer-events: none;
}

#app {
  height: 100vh;
  width: 100vw;
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>

<script>
/*
 * This is Free Software under GNU Affero General Public License v >= 3.0
 * without warranty, see README.md and license for details.
 * 
 * SPDX-License-Identifier: AGPL-3.0-or-later
 * License-Filename: LICENSES/AGPL-3.0.txt
 * 
 * Copyright (C) 2018 by via donau 
 *   – Österreichische Wasserstraßen-Gesellschaft mbH
 * Software engineering by Intevation GmbH
 * 
 * Author(s):
 * Thomas Junk <thomas.junk@intevation.de>
 * Markus Kottländer <markus.kottlaender@intevation.de>
 */
import { mapState } from "vuex";

export default {
  name: "app",
  computed: {
    ...mapState("user", ["isAuthenticated"]),
    routeName() {
      const routeName = this.$route.name;
      return routeName;
    }
  },
  components: {
    Sidebar: () => import("./application/Sidebar"),
    Bottlenecks: () => import("./bottlenecks/Bottlenecks"),
    Topbar: () => import("./application/Topbar"),
    Userbar: () => import("./application/Userbar"),
    Drawtool: () => import("./drawtool/Drawtool"),
    Morphtool: () => import("./morphtool/Morphtool"),
    Pdftool: () => import("./pdftool/Pdftool"),
    Zoom: () => import("./zoom/zoom")
  }
};
</script>