Mercurial > gemma
diff client/src/components/Maplayer.vue @ 2989:87d34efafb3a
client: added uuid mixin to display multiple instances of the same component in splitview
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Wed, 10 Apr 2019 11:03:15 +0200 |
parents | 1b8bb4f89227 |
children | 44493664d40e |
line wrap: on
line diff
--- a/client/src/components/Maplayer.vue Wed Apr 10 11:00:23 2019 +0200 +++ b/client/src/components/Maplayer.vue Wed Apr 10 11:03:15 2019 +0200 @@ -40,17 +40,18 @@ */ import { HTTP } from "@/lib/http"; import { mapState } from "vuex"; -import uuid from "uuid"; import { Map, View } from "ol"; import { WFS, GeoJSON } from "ol/format"; import { equalTo } from "ol/format/filter"; import { Stroke, Style, Fill } from "ol/style"; import { displayError } from "@/lib/errors"; +import { uuid } from "@/lib/mixins"; import "ol/ol.css"; /* for the sake of debugging */ /* eslint-disable no-console */ export default { + mixins: [uuid], data() { return { splitscreen: false @@ -69,9 +70,6 @@ ...mapState("bottlenecks", ["selectedSurvey"]), ...mapState("application", ["showSplitscreen"]), ...mapState("imports", ["selectedStretchId"]), - uuid() { - return uuid.v4(); - }, hasActiveInteractions() { return ( (this.lineTool && this.lineTool.getActive()) ||