Skip to content

Commit

Permalink
now inkscape perfectly fits/centers the drawing on startup, sorry for…
Browse files Browse the repository at this point in the history
… not focusing on this bug earlier. thanks to Damien for reminding.
  • Loading branch information
ozcan committed Mar 16, 2017
1 parent bd249ce commit f7cd4de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions anvio/data/interactive/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1777,12 +1777,17 @@ function exportSvg(dontDownload) {
drawTitle(last_settings);
drawLegend();

var svg = document.getElementById('svg');
var viewBox = svg.getBBox();
svg.setAttribute('viewBox', viewBox['x'] + " " + viewBox['y'] + " " + viewBox['width'] + " " + viewBox['height'])

if (dontDownload == true) {
return;
}

svgCrowbar();

svg.removeAttribute('viewBox');
$('#samples_tree').prepend(detached_clones);
$('#bin_legend').remove();
$('#layer_legend').remove();
Expand Down

0 comments on commit f7cd4de

Please sign in to comment.