Skip to content

Commit 7abc694

Browse files
author
VIB BITS
authored
Merge pull request #1 from nvazquezg/master
Fix height and width in getSVGData.
2 parents b14d9c5 + b103c73 commit 7abc694

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/phyd3.phylogram.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ window.requestAnimFrame = (function(){
634634
oHeight = height.value;
635635

636636
transform.value = "translate("+options.marginX+", "+options.marginY+")";
637-
width.value = bbox.width + options.marginX;
638-
height.value = bbox.height + options.marginY;
637+
width.value = (Math.max(+width.value.replace('px', ''), bbox.width) + options.marginX).toString();
638+
height.value = (Math.max(+height.value.replace('px', ''), bbox.height) + options.marginY).toString();
639639

640640
if (typeof window.XMLSerializer != "undefined") {
641641
var svgData = (new XMLSerializer()).serializeToString(svg);

0 commit comments

Comments
 (0)