|
24 | 24 | */ |
25 | 25 |
|
26 | 26 | (function (jsPDFAPI) { |
27 | | - 'use strict'; |
| 27 | +// 'use strict'; |
28 | 28 |
|
29 | 29 | var maxLn = 0, |
30 | 30 | lnP = 0, |
|
57 | 57 | fontName = this.internal.getFont().fontName; |
58 | 58 | fontSize = this.internal.getFontSize(); |
59 | 59 | fontStyle = this.internal.getFont().fontStyle; |
| 60 | + |
60 | 61 | var px2pt = 1.545454545454545454545454, |
61 | 62 | dimensions, |
62 | 63 | text; |
|
116 | 117 | } |
117 | 118 |
|
118 | 119 | var curCell = getLastCellPosition(), |
119 | | - dim = this.getTextDimentions(txt), |
| 120 | + dim = this.getTextDimensions(txt), |
120 | 121 | isNewLn = 1; |
121 | 122 | if (curCell.x !== undefined && curCell.ln === ln) { |
122 | 123 | x = curCell.x + curCell.w; |
|
146 | 147 |
|
147 | 148 | /** |
148 | 149 | * Create a table from an {#Ext.data.Store} or a set of data. |
149 | | - * @param dataSet {Ext.data.Model[]|Ext.data.Store} |
150 | | - * @param [headers] {Array} Omit or null to auto-generate headers at a performance cost |
151 | | - * @param [autoSize=true] {Boolean} |
| 150 | + * @param {Ext.data.Model[]|Ext.data.Store} dataSet |
| 151 | + * @param {Array} [headers] Omit or null to auto-generate headers at a performance cost |
| 152 | + * @param {Object} [config.printColumnHeaders] True to print column headers at the top of every page |
| 153 | + * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value |
| 154 | + * @param {Object} [config.autoStretch] True to force the table to fit the width of the page |
152 | 155 | */ |
153 | 156 | jsPDFAPI.table = function(dataSet, headers, config){ |
154 | 157 |
|
|
163 | 166 | } |
164 | 167 |
|
165 | 168 | if(!dataSet){ |
166 | | - Ext.Error.raise('No data for PDF table'); |
| 169 | + throw 'No data for PDF table'; |
167 | 170 | } |
168 | 171 |
|
169 | 172 | if(dataSet.isStore){ |
|
193 | 196 | for (var i = 0, ln = headers.length; i < ln; i++) { |
194 | 197 | index = headers[i]; |
195 | 198 | columnMatrix[index] = Ext.Array.map(models, function(rec){ |
196 | | - debugger; |
197 | 199 | if(!rec.get){ |
198 | 200 | console.log(rec.$className); |
199 | 201 | } |
|
0 commit comments