Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pbarth
Genome-viewer
Commits
0fb77945
Commit
0fb77945
authored
Oct 23, 2018
by
Patrick Blumenkamp
Browse files
add hover event
parent
5cbb1887
Changes
1
Hide whitespace changes
Inline
Side-by-side
genome-vuer/src/js/feature.js
View file @
0fb77945
...
...
@@ -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
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment