Commit a9fc73a4 by gutkaBinit Committed by kevalbhatt

ATLAS-3105 : UI : Distorted image is downloaded, for certain conditions

Signed-off-by: 's avatarkevalbhatt <kbhatt@apache.org>
parent 4551dcd7
...@@ -940,8 +940,10 @@ define(['require', ...@@ -940,8 +940,10 @@ define(['require',
$(svgClone).find('>g').attr("transform", "scale(" + scaleFactor + ")"); $(svgClone).find('>g').attr("transform", "scale(" + scaleFactor + ")");
var canvasOffset = { x: 150, y: 150 }, var canvasOffset = { x: 150, y: 150 },
setWidth = (svgClone.getBBox().width + (canvasOffset.x)), setWidth = (svgClone.getBBox().width + (canvasOffset.x)),
setHeight = (svgClone.getBBox().height + (canvasOffset.y)); setHeight = (svgClone.getBBox().height + (canvasOffset.y)),
svgClone.attributes.viewBox.value = "-10,-10," + setWidth + "," + setHeight; xAxis = svgClone.getBBox().x,
yAxis = svgClone.getBBox().y;
svgClone.attributes.viewBox.value = xAxis + "," + yAxis + "," + setWidth + "," + setHeight;
var createCanvas = document.createElement('canvas'); var createCanvas = document.createElement('canvas');
createCanvas.id = "canvas"; createCanvas.id = "canvas";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment