view client/src/layers/Layerselect.vue @ 638:c2f040dba57f

feat: collapsible layer selection The layerselection has now a clickable icon, which allows it to collapse/expand the layerselection.
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 13 Sep 2018 10:09:08 +0200
parents d4fa28bfa6ec
children 959892ffd72c
line wrap: on
line source

<template>
    <div class="form-check d-flex flex-row flex-start selection">
        <input class="form-check-input" @change="visibilityToggled" :id="layername" type="checkbox" :checked="isVisible">
        <label class="layername form-check-label" :for="layername">{{this.layername}}</label>
    </div>
</template>

<style lang="scss">
.selection {
  text-align: left;
}
.layername {
  margin-left: $small-offset;
}
</style>


<script>
export default {
  props: ["layername", "layerindex", "isVisible"],
  name: "layerselect",
  methods: {
    visibilityToggled() {
      this.$emit("visibilityToggled", this.layerindex);
    }
  }
};
</script>