Maintenance - Mise à jour mensuelle Lundi 7 Décembre 2021 entre 7h00 et 9h00

Commit edae2f3d authored by Philippe Bardou's avatar Philippe Bardou
Browse files

Bug export csv

parent acfda736
...@@ -683,6 +683,11 @@ ...@@ -683,6 +683,11 @@
// Calculate the width and height of the Array // Calculate the width and height of the Array
var w = a.length ? a.length : 0, var w = a.length ? a.length : 0,
h = a[0] instanceof Array ? a[0].length : 0; h = a[0] instanceof Array ? a[0].length : 0;
for(i=0; i<w; i++) {
if(a[i] instanceof Array && a[i].length > h) {
h = a[i].length;
}
}
// In case it is a zero matrix, no transpose routine needed. // In case it is a zero matrix, no transpose routine needed.
if(h === 0 || w === 0) { return []; } if(h === 0 || w === 0) { return []; }
var i, j, t = []; var i, j, t = [];
...@@ -2123,8 +2128,7 @@ ...@@ -2123,8 +2128,7 @@
csvContent += "##\n## Warning: comma(s) have been replaced by underscore(s)\n##\n"; csvContent += "##\n## Warning: comma(s) have been replaced by underscore(s)\n##\n";
} }
transpose(rawData).forEach(function(infoArray, index){ transpose(rawData).forEach(function(infoArray, index){
dataString = infoArray.join(","); csvContent += infoArray.join(",") + "\n";
csvContent += index <= infoArray.length ? dataString+ "\n" : dataString;
}); });
var encodedUri = encodeURI(csvContent); var encodedUri = encodeURI(csvContent);
$('#data-export').attr("href", encodedUri); $('#data-export').attr("href", encodedUri);
...@@ -5327,7 +5331,6 @@ return function(zStack, options, doc, queue, _html2canvas) { ...@@ -5327,7 +5331,6 @@ return function(zStack, options, doc, queue, _html2canvas) {
if (storageContext.clip){ if (storageContext.clip){
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();
// console.log(storageContext);
ctx.rect(storageContext.clip.left, storageContext.clip.top, storageContext.clip.width, storageContext.clip.height); ctx.rect(storageContext.clip.left, storageContext.clip.top, storageContext.clip.width, storageContext.clip.height);
ctx.clip(); ctx.clip();
} }
......
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