Skip to content

Commit cee5832

Browse files
committed
add typesetMath to config
1 parent 9beda27 commit cee5832

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/lib/svg_text_utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports.convertToTspans = function(_context, gd, _callback) {
6262
}
6363

6464
if(tex) {
65-
((gd && gd._promises) || []).push(new Promise(function(resolve) {
65+
((gd && gd._context && gd._context.typesetMath && gd._promises) || []).push(new Promise(function(resolve) {
6666
_context.style('display', 'none');
6767
var fontSize = parseInt(_context.node().style.fontSize, 10);
6868
var config = {fontSize: fontSize};

src/plot_api/plot_config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ var configAttributes = {
2222
].join(' ')
2323
},
2424

25+
typesetMath: {
26+
valType: 'boolean',
27+
dflt: true,
28+
description: 'Determines whether the math should be typeset or not.'
29+
},
30+
2531
plotlyServerURL: {
2632
valType: 'string',
2733
dflt: '',

test/plot-schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@
365365
"noBlank": true,
366366
"valType": "string"
367367
},
368+
"typesetMath": {
369+
"description": "Determines whether the math should be typeset or not.",
370+
"dflt": true,
371+
"valType": "boolean"
372+
},
368373
"watermark": {
369374
"description": "watermark the images with the company's logo",
370375
"dflt": false,

0 commit comments

Comments
 (0)