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

Skip to content

Commit 57e4344

Browse files
committed
try whitelist of non full doplot plot type in Plotly.restyle
1 parent bc76e40 commit 57e4344

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/plot_api/plot_api.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,10 +1654,11 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
16541654
axlist,
16551655
flagAxForDelete = {};
16561656

1657-
// for now, if we detect gl or geo stuff, just re-do the plot
1658-
if(fullLayout._hasGL3D || fullLayout._hasGeo || fullLayout._hasGL2D) {
1659-
doplot = true;
1660-
}
1657+
// TODO ... is this correct ???
1658+
var doPlotWhiteList = ['cartesian', 'pie', 'ternary'];
1659+
fullLayout._basePlotModules.forEach(function(_module) {
1660+
if(doPlotWhiteList.indexOf(_module.name) === -1) doplot = true;
1661+
});
16611662

16621663
// make a new empty vals array for undoit
16631664
function a0() { return traces.map(function() { return undefined; }); }

0 commit comments

Comments
 (0)