|
4 | 4 | (global.jspdf = factory()); |
5 | 5 | }(this, function () { 'use strict'; |
6 | 6 |
|
7 | | - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
| 7 | + var babelHelpers = {}; |
| 8 | + babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { |
8 | 9 | return typeof obj; |
9 | 10 | } : function (obj) { |
10 | 11 | return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
11 | 12 | }; |
| 13 | + babelHelpers; |
12 | 14 |
|
13 | 15 | /** @preserve |
14 | 16 | * jsPDF - PDF Document creation from JavaScript |
15 | | - * Version 1.3.2 Built on 2016-10-04T11:40:16.462Z |
16 | | - * CommitID 6fa7d4ecc0 |
| 17 | + * Version 1.3.2 Built on 2016-10-07T01:00:15.786Z |
| 18 | + * CommitID b3ebba4871 |
17 | 19 | * |
18 | 20 | * Copyright (c) 2010-2016 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF |
19 | 21 | * 2010 Aaron Spike, https://github.com/acspike |
|
163 | 165 | function jsPDF(orientation, unit, format, compressPdf) { |
164 | 166 | var options = {}; |
165 | 167 |
|
166 | | - if ((typeof orientation === 'undefined' ? 'undefined' : _typeof(orientation)) === 'object') { |
| 168 | + if ((typeof orientation === 'undefined' ? 'undefined' : babelHelpers.typeof(orientation)) === 'object') { |
167 | 169 | options = orientation; |
168 | 170 |
|
169 | 171 | orientation = options.orientation; |
|
1139 | 1141 | _addPage.apply(this, arguments); |
1140 | 1142 | return this; |
1141 | 1143 | }; |
| 1144 | + /** |
| 1145 | + * Adds (and transfers the focus to) new page to the PDF document. |
| 1146 | + * @function |
| 1147 | + * @returns {jsPDF} |
| 1148 | + * |
| 1149 | + * @methodOf jsPDF# |
| 1150 | + * @name setPage |
| 1151 | + * @param {Number} page Switch the active page to the page number specified |
| 1152 | + * @example |
| 1153 | + * doc = jsPDF() |
| 1154 | + * doc.addPage() |
| 1155 | + * doc.addPage() |
| 1156 | + * doc.text('I am on page 3') |
| 1157 | + * doc.setPage(1) |
| 1158 | + * doc.text('I am on page 1') |
| 1159 | + */ |
1142 | 1160 | API.setPage = function () { |
1143 | 1161 | _setPage.apply(this, arguments); |
1144 | 1162 | return this; |
|
1855 | 1873 | } else { |
1856 | 1874 | color = f2(ch1 / 255) + ' g'; |
1857 | 1875 | } |
1858 | | - } else if (ch4 === undefined || (typeof ch4 === 'undefined' ? 'undefined' : _typeof(ch4)) === 'object') { |
| 1876 | + } else if (ch4 === undefined || (typeof ch4 === 'undefined' ? 'undefined' : babelHelpers.typeof(ch4)) === 'object') { |
1859 | 1877 | // RGB |
1860 | 1878 | if (typeof ch1 === 'string') { |
1861 | 1879 | color = [ch1, ch2, ch3, 'rg'].join(' '); |
|
2065 | 2083 | jsPDF.API = { |
2066 | 2084 | events: [] |
2067 | 2085 | }; |
2068 | | - jsPDF.version = "1.3.2 2016-10-04T11:40:16.462Z:jameshall"; |
| 2086 | + jsPDF.version = "1.x-master"; |
2069 | 2087 |
|
2070 | 2088 | if (typeof define === 'function' && define.amd) { |
2071 | 2089 | define('jsPDF', function () { |
|
2078 | 2096 | } |
2079 | 2097 | return jsPDF; |
2080 | 2098 | }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || undefined); |
2081 | | - /*rollup-keeper-start*/window.tmp = jsPDF; |
| 2099 | + |
2082 | 2100 |
|
2083 | 2101 | /** |
2084 | 2102 | * jsPDF AcroForm Plugin |
@@ -4020,7 +4038,7 @@ Q\n"; |
4020 | 4038 | return typeof jsPDFAPI['process' + type.toUpperCase()] !== 'function'; |
4021 | 4039 | }, |
4022 | 4040 | isDOMElement = function isDOMElement(object) { |
4023 | | - return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object.nodeType === 1; |
| 4041 | + return (typeof object === 'undefined' ? 'undefined' : babelHelpers.typeof(object)) === 'object' && object.nodeType === 1; |
4024 | 4042 | }, |
4025 | 4043 | createDataURIFromElement = function createDataURIFromElement(element, format, angle) { |
4026 | 4044 |
|
@@ -4055,7 +4073,7 @@ Q\n"; |
4055 | 4073 | to_radians = Math.PI / 180, |
4056 | 4074 | angleInRadians; |
4057 | 4075 |
|
4058 | | - if ((typeof angle === 'undefined' ? 'undefined' : _typeof(angle)) === 'object') { |
| 4076 | + if ((typeof angle === 'undefined' ? 'undefined' : babelHelpers.typeof(angle)) === 'object') { |
4059 | 4077 | x = angle.x; |
4060 | 4078 | y = angle.y; |
4061 | 4079 | b = angle.bg; |
@@ -4373,7 +4391,7 @@ Q\n"; |
4373 | 4391 | format = tmp; |
4374 | 4392 | } |
4375 | 4393 |
|
4376 | | - if ((typeof imageData === 'undefined' ? 'undefined' : _typeof(imageData)) === 'object' && !isDOMElement(imageData) && "imageData" in imageData) { |
| 4394 | + if ((typeof imageData === 'undefined' ? 'undefined' : babelHelpers.typeof(imageData)) === 'object' && !isDOMElement(imageData) && "imageData" in imageData) { |
4377 | 4395 | var options = imageData; |
4378 | 4396 |
|
4379 | 4397 | imageData = options.imageData; |
@@ -7109,7 +7127,7 @@ Q\n"; |
7109 | 7127 | l = cns.length; |
7110 | 7128 | while (i < l) { |
7111 | 7129 | cn = cns[i]; |
7112 | | - if ((typeof cn === "undefined" ? "undefined" : _typeof(cn)) === "object") { |
| 7130 | + if ((typeof cn === "undefined" ? "undefined" : babelHelpers.typeof(cn)) === "object") { |
7113 | 7131 |
|
7114 | 7132 | //execute all watcher functions to e.g. reset floating |
7115 | 7133 | renderer.executeWatchFunctions(cn); |
|
0 commit comments