You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2019/03/28 12:33:19 UTC
[atlas] 01/02: ATLAS-3105 : UI : Distorted image is downloaded,
for certain conditions
This is an automated email from the ASF dual-hosted git repository.
kbhatt pushed a commit to branch branch-1.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 5dc6213a177842f4e11d94ce0bb1a76e408aee46
Author: gutkaBinit <bi...@gmail.com>
AuthorDate: Thu Mar 28 15:36:58 2019 +0530
ATLAS-3105 : UI : Distorted image is downloaded, for certain conditions
Signed-off-by: kevalbhatt <kb...@apache.org>
(cherry picked from commit a9fc73a45903aac0e04793a4e9681159ee0a0b03)
---
dashboardv2/public/js/views/graph/LineageLayoutView.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index de510cb..7b9ff58 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -940,8 +940,10 @@ define(['require',
$(svgClone).find('>g').attr("transform", "scale(" + scaleFactor + ")");
var canvasOffset = { x: 150, y: 150 },
setWidth = (svgClone.getBBox().width + (canvasOffset.x)),
- setHeight = (svgClone.getBBox().height + (canvasOffset.y));
- svgClone.attributes.viewBox.value = "-10,-10," + setWidth + "," + setHeight;
+ setHeight = (svgClone.getBBox().height + (canvasOffset.y)),
+ xAxis = svgClone.getBBox().x,
+ yAxis = svgClone.getBBox().y;
+ svgClone.attributes.viewBox.value = xAxis + "," + yAxis + "," + setWidth + "," + setHeight;
var createCanvas = document.createElement('canvas');
createCanvas.id = "canvas";