Skip to content

Commit 1395210

Browse files
committed
export cleanPlot as part of the Plots module
1 parent d29a90f commit 1395210

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/plots/plots.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ plots.supplyDefaults = function(gd) {
492492
plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData);
493493

494494
// clean subplots and other artifacts from previous plot calls
495-
cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout);
495+
plots.cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout);
496496

497497
/*
498498
* Relink functions and underscore attributes to promote consistency between
@@ -520,7 +520,7 @@ plots.supplyDefaults = function(gd) {
520520
}
521521
};
522522

523-
function cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout) {
523+
plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {
524524
var i, j;
525525

526526
var plotTypes = Object.keys(subplotsRegistry);
@@ -755,9 +755,9 @@ plots.supplyLayoutModuleDefaults = function(layoutIn, layoutOut, fullData) {
755755
}
756756
};
757757

758+
// Remove all plotly attributes from a div so it can be replotted fresh
759+
// TODO: these really need to be encapsulated into a much smaller set...
758760
plots.purge = function(gd) {
759-
// remove all plotly attributes from a div so it can be replotted fresh
760-
// TODO: these really need to be encapsulated into a much smaller set...
761761

762762
// note: we DO NOT remove _context because it doesn't change when we insert
763763
// a new plot, and may have been set outside of our scope.

0 commit comments

Comments
 (0)