Skip to content

Commit f2a2bad

Browse files
committed
Round off sizes for "string" pageSizes
1 parent 5c1f71d commit f2a2bad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/component/plotly-dash-preview/constants.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ module.exports = {
66
maxRenderingTries: 100,
77
pixelsInMicron: pixelsInInch / micronsInInch,
88
sizeMapping: {
9-
'A3': { 'width': 11.7 * pixelsInInch, 'height': 16.5 * pixelsInInch },
10-
'A4': { 'width': 8.3 * pixelsInInch, 'height': 11.7 * pixelsInInch },
11-
'A5': { 'width': 5.8 * pixelsInInch, 'height': 8.3 * pixelsInInch },
12-
'Letter': { 'width': 8.5 * pixelsInInch, 'height': 11 * pixelsInInch },
13-
'Legal': { 'width': 8.5 * pixelsInInch, 'height': 14 * pixelsInInch },
14-
'Tabloid': { 'width': 11 * pixelsInInch, 'height': 17 * pixelsInInch }
9+
'A3': { 'width': Math.ceil(11.7 * pixelsInInch), 'height': Math.ceil(16.5 * pixelsInInch) },
10+
'A4': { 'width': Math.ceil(8.3 * pixelsInInch), 'height': Math.ceil(11.7 * pixelsInInch) },
11+
'A5': { 'width': Math.ceil(5.8 * pixelsInInch), 'height': Math.ceil(8.3 * pixelsInInch) },
12+
'Letter': { 'width': Math.ceil(8.5 * pixelsInInch), 'height': Math.ceil(11 * pixelsInInch) },
13+
'Legal': { 'width': Math.ceil(8.5 * pixelsInInch), 'height': Math.ceil(14 * pixelsInInch) },
14+
'Tabloid': { 'width': Math.ceil(11 * pixelsInInch), 'height': Math.ceil(17 * pixelsInInch) }
1515
},
1616
statusMsg: {
1717
525: 'dash preview generation failed',

0 commit comments

Comments
 (0)