Commit 0fb77945 authored by Patrick Blumenkamp's avatar Patrick Blumenkamp
Browse files

add hover event

parent 5cbb1887
......@@ -2,7 +2,7 @@ Vue.component("feature",{
template:
`
<svg :height="svgHeight" :width="svgWidth" :x="svgX" :y="svgY">
<polygon :points="arrow_coordinates" :style=featureStyle @click="clickEvent" />
<polygon :points="arrow_coordinates" :style=featureStyle @click="clickEvent" @mouseover="hoverEvent" />
</svg>
`,
props: ['svgWidth', 'svgHeight', 'svgX', 'svgY', 'color', 'borderColor', 'featureId'],
......@@ -30,6 +30,9 @@ Vue.component("feature",{
methods: {
clickEvent (evt) {
this.$emit('click', this.featureId)
},
hoverEvent (evt) {
this.$emit('hover', this.featureId)
}
},
data: function(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment