Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
549430ab
Commit
549430ab
authored
Apr 11, 2018
by
Floreal Cabanettes
Browse files
Keep zoom on svg export
parent
6ff2f351
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/dgenies/static/js/dgenies.result.export.js
View file @
549430ab
...
...
@@ -30,16 +30,12 @@ dgenies.result.export.export_png = function() {
dgenies
.
result
.
export
.
export_svg
=
function
()
{
dgenies
.
show_loading
(
"
Building picture...
"
,
180
);
window
.
setTimeout
(()
=>
{
let
transform
=
d3
.
boxplot
.
container
.
attr
(
"
transform
"
);
let
after
=
function
()
{
let
svg
=
"
<?xml version=
\"
1.0
\"
encoding=
\"
utf-8
\"
?>
\n
<!DOCTYPE svg PUBLIC
\"
-//W3C//DTD SVG 1.1//EN
\"
"
+
"
\"
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
\"
>
"
;
svg
+=
dgenies
.
result
.
export
.
get_svg
(
"
1000px
"
);
let
blob
=
new
Blob
([
svg
],
{
type
:
"
image/svg+xml
"
});
d3
.
boxplot
.
zoom
.
restore_scale
(
transform
);
dgenies
.
result
.
export
.
save_file
(
blob
,
"
svg
"
);
};
d3
.
boxplot
.
zoom
.
reset_scale
(
true
,
after
);
let
svg
=
"
<?xml version=
\"
1.0
\"
encoding=
\"
utf-8
\"
?>
\n
<!DOCTYPE svg PUBLIC
\"
-//W3C//DTD SVG 1.1//EN
\"
"
+
"
\"
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
\"
>
"
;
svg
+=
dgenies
.
result
.
export
.
get_svg
(
"
1000px
"
);
let
blob
=
new
Blob
([
svg
],
{
type
:
"
image/svg+xml
"
});
//d3.boxplot.zoom.restore_scale(transform);
dgenies
.
result
.
export
.
save_file
(
blob
,
"
svg
"
);
},
0
);
};
...
...
src/dgenies/static/js/dgenies.result.min.js
View file @
549430ab
This diff is collapsed.
Click to expand it.
src/dgenies/views.py
View file @
549430ab
...
...
@@ -403,6 +403,7 @@ def install():
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"install"
,
content
=
content
,
toc
=
toc
)
@
app
.
route
(
"/contact"
,
methods
=
[
'GET'
])
def
contact
():
return
render_template
(
"contact.html"
,
menu
=
"contact"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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