Mercurial > gemma
view client/src/layers/Layers.vue @ 1075:c1989ebe1d8a
feat: invert fairwayprofile scale
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 26 Oct 2018 13:21:17 +0200 |
parents | ca628dce90dd |
children | 595654ad3f66 |
line wrap: on
line source
<template> <div class="layerselectmenu"> <div @click="collapse" class="d-flex flex-column ui-element minimizer"> <div> <i class="fa fa-th-list"></i> </div> </div> <div :class="layerSelectStyle"> <div v-if="!collapsed" class="card-body layers"> <div class="headline"> <h4 class="card-title">Layers</h4> </div> <hr> <div class="d-flex flex-column"> <Layerselect :layerindex="index" :layername="layer.name" v-for="(layer, index) in layers" :key="layer.name" :isVisible="layer.isVisible" @visibilityToggled="visibilityToggled"></Layerselect> </div> </div> </div> </div> </template> <style lang="scss"> .layerselectmenu { position: relative; margin-right: $offset; } .layerselection { background-color: white; margin-left: $small-offset; opacity: $slight-transparent; } .layerselectioncollapsed { min-height: $icon-height; width: $icon-width; transition: $transition-fast; } .layerselectionexpanded { min-height: $layerselect-height; width: $layerselect-width; } .minimizer { position: absolute; z-index: 2; right: 0; margin-top: $x-small-offset; border-radius: $border-radius; height: $icon-width; width: $icon-height; } </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> */ import Layerselect from "./Layerselect"; import { mapGetters } from "vuex"; export default { name: "layers", data() { return { collapsed: false }; }, components: { Layerselect }, computed: { ...mapGetters("mapstore", ["layers"]), layerSelectStyle() { return { "ui-element": true, card: true, layerselection: true, shadow: true, layerselectionexpanded: !this.collapsed, layerselectioncollapsed: this.collapsed }; } }, methods: { collapse() { this.collapsed = !this.collapsed; }, visibilityToggled(layer) { this.$store.commit("mapstore/toggleVisibility", layer); } } }; </script>