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
Remi PLANEL
bioviz-js
Commits
87e5a95b
Commit
87e5a95b
authored
Apr 01, 2019
by
Remi PLANEL
Browse files
Add gene-shapes module
parent
d7db88af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripts/component/sequence/gene-shapes.ts
0 → 100644
View file @
87e5a95b
import
{
GeneData
}
from
"
./gene
"
;
import
{
ScaleLinear
}
from
"
d3-scale
"
;
export
function
arrowShape
(
data
:
GeneData
,
xScale
:
ScaleLinear
<
number
,
number
>
,
geneHeight
:
number
)
{
const
geneWidth
=
xScale
(
data
.
length
);
return
"
M 0 0 V
"
+
(
-
geneHeight
)
+
"
H
"
+
geneWidth
+
"
V
"
+
geneHeight
+
"
H
"
+
(
-
geneWidth
)
+
"
Z
"
;
}
\ No newline at end of file
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