Skip to content

Commit 42234c3

Browse files
committed
Set plotGlPixelRatio to 2x the scale factor
1 parent 0fa6083 commit 42234c3

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

repos/kaleido/js/src/plotly/constants.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ module.exports = {
3434

3535
mathJaxConfigQuery: '?config=TeX-AMS-MML_SVG',
3636

37-
// config option passed in render step
38-
plotGlPixelRatio: 2.5,
39-
4037
// time [in ms] after which printToPDF errors when image isn't loaded
4138
pdfPageLoadImgTimeout: 20000
4239
}

repos/kaleido/js/src/plotly/render.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ function render (info, mapboxAccessToken, topojsonURL) {
3838

3939
// Use parsed export request
4040
info = parsed.result;
41-
const figure = info.figure
42-
const format = info.format
43-
const encoded = info.encoded
41+
const figure = info.figure;
42+
const format = info.format;
43+
const encoded = info.encoded;
4444

4545
// Build default config, and let figure.config override it
4646
const defaultConfig = {
4747
mapboxAccessToken: opts.mapboxAccessToken || null,
48-
plotGlPixelRatio: opts.plotGlPixelRatio || cst.plotGlPixelRatio
48+
plotGlPixelRatio: info.scale * 2
4949
}
5050
if (opts.topojsonURL) {
5151
defaultConfig.topojsonURL = opts.topojsonURL

0 commit comments

Comments
 (0)