Mercurial > gemma
changeset 1104:9c15e3bf8066
removed unnecessary function and reduced code a bit
Function was only used once and there is no way to deactivate the identify mode, thus this code doesn't need a function (for now).
The event types can be passed as an array.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 02 Nov 2018 14:21:51 +0100 |
parents | dfe3966bb308 |
children | 9f1e1f3f3fb3 |
files | client/src/map/Maplayer.vue |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Fri Nov 02 11:04:46 2018 +0100 +++ b/client/src/map/Maplayer.vue Fri Nov 02 14:21:51 2018 +0100 @@ -241,14 +241,6 @@ this.interaction = interaction; this.openLayersMap.addInteraction(interaction); }, - activateIdentifyMode() { - this.openLayersMap.on("singleclick", event => { - this.identify(event.coordinate, event.pixel); - }); - this.openLayersMap.on("dblclick", event => { - this.identify(event.coordinate, event.pixel); - }); - }, identify(coordinate, pixel) { this.$store.commit("identifystore/setIdentifiedFeatures", []); // checking our WFS layers @@ -575,7 +567,9 @@ // so none is shown this.updateBottleneckFilter("does_not_exist", "1999-10-01"); - this.activateIdentifyMode(); + this.openLayersMap.on(["singleclick", "dblclick"], event => { + this.identify(event.coordinate, event.pixel); + }); } }; </script>