Skip to content

Commit 3b36f60

Browse files
committed
adjust configClone
1 parent 3b702d6 commit 3b36f60

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

components/dash-core-components/src/fragments/Graph.react.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,15 @@ class PlotlyGraph extends Component {
150150
figure = props._dashprivate_transformFigure(figure, gd);
151151
config = props._dashprivate_transformConfig(config, gd);
152152

153+
const configClone = this.getConfig(config, responsive);
154+
// add typesetMath | not exposed to the dash API
155+
configClone.typesetMath = this.props.mathjax;
156+
153157
const figureClone = {
154158
data: figure.data,
155159
layout: this.getLayout(figure.layout, responsive),
156160
frames: figure.frames,
157-
config: this.getConfig(config, responsive),
161+
config: configClone,
158162
};
159163

160164
if (
@@ -174,11 +178,6 @@ class PlotlyGraph extends Component {
174178
return Plotly.animate(gd, figureClone, animation_options);
175179
}
176180

177-
const layoutClone = this.getLayout(figure.layout, responsive);
178-
const configClone = this.getConfig(config, responsive);
179-
// add typesetMath | not exposed to the dash API
180-
configClone.typesetMath = this.props.mathjax;
181-
182181
gd.classList.add('dash-graph--pending');
183182

184183
return Plotly.react(gd, figureClone).then(() => {

0 commit comments

Comments
 (0)