@@ -63,8 +63,11 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
63
63
// Skip trace if whitelist provided and it's not whitelisted:
64
64
// if (Array.isArray(traces) && traces.indexOf(i) === -1) continue;
65
65
if ( trace . xaxis + trace . yaxis === subplot ) {
66
+ // XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet
67
+ // axis has actually changed:
68
+ //
66
69
// If this trace is specifically requested, add it to the list:
67
- if ( traces . indexOf ( trace . index ) !== - 1 ) {
70
+ if ( traces . indexOf ( trace . index ) !== - 1 || trace . carpet ) {
68
71
// Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate
69
72
// traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill
70
73
// is outdated. So this retroactively adds the previous trace if the
@@ -300,6 +303,7 @@ function makeSubplotLayer(plotinfo) {
300
303
joinLayer ( parent , 'g' , 'imagelayer' ) ;
301
304
joinLayer ( parent , 'g' , 'maplayer' ) ;
302
305
joinLayer ( parent , 'g' , 'barlayer' ) ;
306
+ joinLayer ( parent , 'g' , 'carpetlayer' ) ;
303
307
joinLayer ( parent , 'g' , 'boxlayer' ) ;
304
308
joinLayer ( parent , 'g' , 'scatterlayer' ) ;
305
309
}
0 commit comments