@@ -1218,8 +1218,7 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
1218
1218
if ( subplots [ attri ] ) Lib . pushUnique ( subplots [ attri ] , vali ) ;
1219
1219
subplotId += vali ;
1220
1220
}
1221
- }
1222
- else {
1221
+ } else {
1223
1222
subplotId = Lib . coerce ( traceIn , traceOut , subplotAttrs , subplotAttr ) ;
1224
1223
}
1225
1224
@@ -1230,18 +1229,6 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
1230
1229
}
1231
1230
}
1232
1231
1233
- function coerceUnlessPruned ( attr , dflt , cb ) {
1234
- if ( _module && ( attr in _module . attributes ) && _module . attributes [ attr ] === undefined ) {
1235
- // Pruned
1236
- } else {
1237
- if ( cb && typeof cb === 'function' ) {
1238
- cb ( ) ;
1239
- } else {
1240
- coerce ( attr , dflt ) ;
1241
- }
1242
- }
1243
- }
1244
-
1245
1232
if ( visible ) {
1246
1233
coerce ( 'customdata' ) ;
1247
1234
coerce ( 'ids' ) ;
@@ -1250,33 +1237,33 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
1250
1237
traceOut . _dfltShowLegend = true ;
1251
1238
coerce ( 'showlegend' ) ;
1252
1239
coerce ( 'legendgroup' ) ;
1253
- }
1254
- else {
1240
+ } else {
1255
1241
traceOut . _dfltShowLegend = false ;
1256
1242
}
1257
1243
1258
- coerceUnlessPruned ( 'hoverlabel' , '' , function ( ) {
1259
- Registry . getComponentMethod (
1260
- 'fx' ,
1261
- 'supplyDefaults'
1262
- ) ( traceIn , traceOut , defaultColor , layout ) ;
1263
- } ) ;
1264
-
1265
- // TODO add per-base-plot-module trace defaults step
1266
-
1267
1244
if ( _module ) {
1268
1245
_module . supplyDefaults ( traceIn , traceOut , defaultColor , layout ) ;
1269
- if ( ! traceOut . hovertemplate ) Lib . coerceHoverinfo ( traceIn , traceOut , layout ) ;
1270
1246
}
1271
1247
1272
- if ( ! Registry . traceIs ( traceOut , 'noOpacity' ) ) coerce ( 'opacity' ) ;
1248
+ if ( ! Registry . traceIs ( traceOut , 'noOpacity' ) ) {
1249
+ coerce ( 'opacity' ) ;
1250
+ }
1273
1251
1274
1252
if ( Registry . traceIs ( traceOut , 'notLegendIsolatable' ) ) {
1275
1253
// This clears out the legendonly state for traces like carpet that
1276
1254
// cannot be isolated in the legend
1277
1255
traceOut . visible = ! ! traceOut . visible ;
1278
1256
}
1279
1257
1258
+ if ( ! Registry . traceIs ( traceOut , 'noHover' ) ) {
1259
+ if ( ! traceOut . hovertemplate ) Lib . coerceHoverinfo ( traceIn , traceOut , layout ) ;
1260
+
1261
+ // parcats support hover, but not hoverlabel stylings (yet)
1262
+ if ( traceOut . type !== 'parcats' ) {
1263
+ Registry . getComponentMethod ( 'fx' , 'supplyDefaults' ) ( traceIn , traceOut , defaultColor , layout ) ;
1264
+ }
1265
+ }
1266
+
1280
1267
if ( _module && _module . selectPoints ) {
1281
1268
coerce ( 'selectedpoints' ) ;
1282
1269
}
0 commit comments