Mercurial > gemma
view client/src/layers/Layers.vue @ 691:d643ff60f607
Client: improve style of waterway axis.
* Add label and circle style to waterway axis via WFS.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 20 Sep 2018 14:33:34 +0200 |
parents | 3e2eeb215d0e |
children | 55fb73a3ebf7 |
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"> <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 { height: $icon-height; width: $icon-width; transition: $transition-fast; } .layerselectionexpanded { 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> 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>