Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pbarth
Genome-viewer
Commits
736f619a
Commit
736f619a
authored
Oct 23, 2018
by
pbarth
Browse files
add functions to generate tooltip string
parent
208db83c
Changes
1
Hide whitespace changes
Inline
Side-by-side
genome-vuer/src/js/genome_viewer.js
View file @
736f619a
...
...
@@ -154,7 +154,26 @@ Vue.component("genome-viewer",{
},
featureClick
(
featureId
)
{
console
.
log
(
featureId
)
}
},
fill_in_tooltip_template
(
feature
,
template
)
{
let
tooltip
=
template
//TODO: Iterate over custom properties
for
(
let
property
of
[
'
name
'
,
'
description
'
,
'
start
'
,
'
end
'
,
'
strand
'
,
'
type
'
]
){
tooltip
=
tooltip
.
replace
(
"
{
"
+
property
+
"
}
"
,
feature
[
property
]
)
}
return
(
tooltip
)
},
get_tooltip
(
e
){
let
element
=
e
.
currentTarget
let
id
=
element
.
getAttribute
(
"
name
"
)
let
feature
=
null
for
(
let
entry
of
this
.
featureData
){
if
(
entry
.
name
===
id
){
feature
=
entry
}
}
console
.
log
(
this
.
fill_in_tooltip_template
(
feature
,
this
.
genomeStats
.
tooltip
)
)
},
},
data
:
function
(){
return
{
...
...
Write
Preview
Supports
Markdown
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