Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
HackbrettXXX committed May 6, 2019
1 parent 339f704 commit 3561de8
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 52 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jspdf-yworks",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/yWorks/jsPDF",
"description": "PDF Document creation from JavaScript",
"main": "dist/jspdf.debug.js",
Expand Down
47 changes: 34 additions & 13 deletions dist/jspdf.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
// with an attribute `content` that corresponds to the window

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : typeof define === 'function' && define.amd ? define(factory) : factory();
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : typeof define === 'function' && define.amd ? define('PromisePolyFill', factory) : factory();
})(window, function () {
/**
* @this {Promise}
Expand Down Expand Up @@ -568,8 +568,8 @@

/** @license
* jsPDF - PDF Document creation from JavaScript
* Version 2.0.0 Built on 2019-01-22T15:32:38.220Z
* CommitID 0110a2202b
* Version 2.0.2 Built on 2019-05-06T09:38:53.381Z
* CommitID 339f704ec3
*
* Copyright (c) 2015-2018 yWorks GmbH, http://www.yworks.com
* 2015-2018 Lukas Holländer <[email protected]>, https://github.com/HackbrettXXX
Expand Down Expand Up @@ -615,7 +615,8 @@
* orientation: 'p',
* unit: 'mm',
* format: 'a4',
* hotfixes: [] // an array of hotfix strings to enable
* hotfixes: [], // an array of hotfix strings to enable,
* floatPrecision: 16 // or "smart", default is 16
* }
* ```
*/
Expand Down Expand Up @@ -751,6 +752,7 @@

var format_as_string = ("" + format).toLowerCase(),
compress = !!compressPdf && typeof Uint8Array === "function",
floatPrecision = options.floatPrecision || 16,
textColor = options.textColor || "0 g",
drawColor = options.drawColor || "0 G",
activeFontSize = options.fontSize || 16,
Expand Down Expand Up @@ -982,12 +984,26 @@
},
f3 = function f3(number) {
return number.toFixed(3); // Ie, %.3f
},
// high precision float
hpf = function hpf(number) {
return number.toFixed(16).replace(/0+$/, "");
},
scaleByK = function scaleByK(coordinate) {
}; // high precision float


var hpf;

if (typeof floatPrecision === "number") {
hpf = function hpf(number) {
return number.toFixed(floatPrecision).replace(/0+$/, "");
};
} else if (floatPrecision === "smart") {
hpf = function hpf(number) {
if (number > -1 && number < 1) {
return number.toFixed(16).replace(/0+$/, "");
} else {
return number.toFixed(5).replace(/0+$/, "");
}
};
}

var scaleByK = function scaleByK(coordinate) {
if (apiMode === ApiMode.COMPAT) {
return coordinate * k;
} else if (apiMode === ApiMode.ADVANCED) {
Expand Down Expand Up @@ -1137,7 +1153,7 @@
strings.push(String.fromCharCode.apply(null, arr.subarray(j * chunkSize, (j + 1) * chunkSize)));
}

p = strings.join('');
p = strings.join("");
out("<</Length " + p.length + " /Filter [/FlateDecode]>>");
} else {
out("<</Length " + p.length + ">>");
Expand Down Expand Up @@ -4887,10 +4903,10 @@
* @memberOf jsPDF
*/

jsPDF.version = "0.0.0";
jsPDF.version = '2.0.2';

if (typeof define === "function" && define.amd) {
define(function () {
define('jsPDF', function () {
return jsPDF;
});
} else if (typeof module !== "undefined" && module.exports) {
Expand Down Expand Up @@ -21625,3 +21641,8 @@
Object.defineProperty(exports, '__esModule', { value: true });

})));

try {
module.exports = jsPDF;
}
catch (e) {}
30 changes: 15 additions & 15 deletions dist/jspdf.min.js

Large diffs are not rendered by default.

45 changes: 33 additions & 12 deletions dist/jspdf.node.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

/** @license
* jsPDF - PDF Document creation from JavaScript
* Version 2.0.0 Built on 2019-01-22T15:32:43.086Z
* CommitID 0110a2202b
* Version 2.0.2 Built on 2019-05-06T09:38:58.181Z
* CommitID 339f704ec3
*
* Copyright (c) 2015-2018 yWorks GmbH, http://www.yworks.com
* 2015-2018 Lukas Holländer <[email protected]>, https://github.com/HackbrettXXX
Expand Down Expand Up @@ -67,7 +67,8 @@
* orientation: 'p',
* unit: 'mm',
* format: 'a4',
* hotfixes: [] // an array of hotfix strings to enable
* hotfixes: [], // an array of hotfix strings to enable,
* floatPrecision: 16 // or "smart", default is 16
* }
* ```
*/
Expand Down Expand Up @@ -203,6 +204,7 @@

var format_as_string = ("" + format).toLowerCase(),
compress = !!compressPdf && typeof Uint8Array === "function",
floatPrecision = options.floatPrecision || 16,
textColor = options.textColor || "0 g",
drawColor = options.drawColor || "0 G",
activeFontSize = options.fontSize || 16,
Expand Down Expand Up @@ -434,12 +436,26 @@
},
f3 = function f3(number) {
return number.toFixed(3); // Ie, %.3f
},
// high precision float
hpf = function hpf(number) {
return number.toFixed(16).replace(/0+$/, "");
},
scaleByK = function scaleByK(coordinate) {
}; // high precision float


var hpf;

if (typeof floatPrecision === "number") {
hpf = function hpf(number) {
return number.toFixed(floatPrecision).replace(/0+$/, "");
};
} else if (floatPrecision === "smart") {
hpf = function hpf(number) {
if (number > -1 && number < 1) {
return number.toFixed(16).replace(/0+$/, "");
} else {
return number.toFixed(5).replace(/0+$/, "");
}
};
}

var scaleByK = function scaleByK(coordinate) {
if (apiMode === ApiMode.COMPAT) {
return coordinate * k;
} else if (apiMode === ApiMode.ADVANCED) {
Expand Down Expand Up @@ -589,7 +605,7 @@
strings.push(String.fromCharCode.apply(null, arr.subarray(j * chunkSize, (j + 1) * chunkSize)));
}

p = strings.join('');
p = strings.join("");
out("<</Length " + p.length + " /Filter [/FlateDecode]>>");
} else {
out("<</Length " + p.length + ">>");
Expand Down Expand Up @@ -4339,10 +4355,10 @@
* @memberOf jsPDF
*/

jsPDF.version = "0.0.0";
jsPDF.version = '2.0.2';

if (typeof define === "function" && define.amd) {
define(function () {
define('jsPDF', function () {
return jsPDF;
});
} else if (typeof module !== "undefined" && module.exports) {
Expand Down Expand Up @@ -19847,3 +19863,8 @@
Object.defineProperty(exports, '__esModule', { value: true });

})));

try {
module.exports = jsPDF;
}
catch (e) {}
20 changes: 10 additions & 10 deletions dist/jspdf.node.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jspdf-yworks",
"version": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/yWorks/jsPDF",
"description": "PDF Document creation from JavaScript",
"main": "dist/jspdf.min.js",
Expand Down

0 comments on commit 3561de8

Please sign in to comment.