voilab-pdf-table
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "voilab-pdf-table", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "PdfKit wrapper that helps to draw informations in simple tables.", | ||
@@ -5,0 +5,0 @@ "main": "voilab-table.js", |
@@ -70,16 +70,19 @@ /*jslint node: true, unparam: true, nomen: true */ | ||
var width = column.width, | ||
padding_left = 0, | ||
padding_top = 0, | ||
data = row._renderedContent.data[column.id] || ''; | ||
padding = { | ||
left: 0, | ||
top: 0 | ||
}, | ||
data = row._renderedContent.data[column.id] || '', | ||
renderer = isHeader ? column.headerRenderer : column.renderer; | ||
if (!isHeader && column.padding) { | ||
padding_left = getPaddingValue('left', column.padding); | ||
padding_top = getPaddingValue('top', column.padding); | ||
padding.left = getPaddingValue('left', column.padding); | ||
padding.top = getPaddingValue('top', column.padding); | ||
width -= getPaddingValue('horizontal', column.padding); | ||
} | ||
// if specified, cache is not used and renderer is called one more time | ||
if (column.cache === false) { | ||
data = (isHeader ? column.headerRenderer : column.renderer)(self, row, true); | ||
if (renderer && column.cache === false) { | ||
data = renderer(self, row, true, column, lodash.clone(pos), padding); | ||
} | ||
self.pdf.text(data, pos.x + padding_left, pos.y + padding_top, lodash.assign({ | ||
self.pdf.text(data, pos.x + padding.left, pos.y + padding.top, lodash.assign({ | ||
height: row._renderedContent.height, | ||
@@ -86,0 +89,0 @@ width: width |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28632
756