Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4df8ec5

Browse files
committed
update setPlotConfig values before calling plot in newPlot
1 parent f89a5ae commit 4df8ec5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/plot_api/plot_api.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,16 @@ function setPlotConfig(obj) {
403403
return Lib.extendFlat(dfltConfig, obj);
404404
}
405405

406+
function updatePlotConfigOnly(config) {
407+
if(config && config.hasOwnProperty('logging')) {
408+
setPlotConfig(config.logging);
409+
}
410+
411+
if(config && config.hasOwnProperty('notifyOnLogging')) {
412+
setPlotConfig(config.notifyOnLogging);
413+
}
414+
}
415+
406416
function setBackground(gd, bgColor) {
407417
try {
408418
gd._fullLayout._paper.style('background', bgColor);
@@ -650,6 +660,9 @@ function newPlot(gd, data, layout, config) {
650660
Plots.cleanPlot([], {}, gd._fullData || [], gd._fullLayout || {});
651661

652662
Plots.purge(gd);
663+
664+
updatePlotConfigOnly(config);
665+
653666
return exports.plot(gd, data, layout, config);
654667
}
655668

0 commit comments

Comments
 (0)