Mercurial > gemma
diff client/src/components/Layerselect.vue @ 531:9c036b32c852
refac: Layer selection componentized
POC from 22cca659e40b splitted into a layerselection component and
iterative rendering. Now more vuelike.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 28 Aug 2018 12:53:56 +0200 |
parents | |
children | 505656a9947f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/Layerselect.vue Tue Aug 28 12:53:56 2018 +0200 @@ -0,0 +1,26 @@ +<template> + <div class="d-flex"> + <label :for="layername">{{this.layername}}</label> + <input @change="visibilityToggled" + :id="layername" + type="checkbox" + :checked="isVisible"> + </div> +</template> + +<style lang="sass"> + +</style> + + +<script> +export default { + props: ["layername", "layerindex", "isVisible"], + name: "layerselect", + methods: { + visibilityToggled() { + this.$emit("visibilityToggled", this.layerindex); + } + } +}; +</script>