@@ -1218,8 +1218,7 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
12181218 if ( subplots [ attri ] ) Lib . pushUnique ( subplots [ attri ] , vali ) ;
12191219 subplotId += vali ;
12201220 }
1221- }
1222- else {
1221+ } else {
12231222 subplotId = Lib . coerce ( traceIn , traceOut , subplotAttrs , subplotAttr ) ;
12241223 }
12251224
@@ -1230,18 +1229,6 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
12301229 }
12311230 }
12321231
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-
12451232 if ( visible ) {
12461233 coerce ( 'customdata' ) ;
12471234 coerce ( 'ids' ) ;
@@ -1250,33 +1237,33 @@ plots.supplyTraceDefaults = function(traceIn, traceOut, colorIndex, layout, trac
12501237 traceOut . _dfltShowLegend = true ;
12511238 coerce ( 'showlegend' ) ;
12521239 coerce ( 'legendgroup' ) ;
1253- }
1254- else {
1240+ } else {
12551241 traceOut . _dfltShowLegend = false ;
12561242 }
12571243
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-
12671244 if ( _module ) {
12681245 _module . supplyDefaults ( traceIn , traceOut , defaultColor , layout ) ;
1269- if ( ! traceOut . hovertemplate ) Lib . coerceHoverinfo ( traceIn , traceOut , layout ) ;
12701246 }
12711247
1272- if ( ! Registry . traceIs ( traceOut , 'noOpacity' ) ) coerce ( 'opacity' ) ;
1248+ if ( ! Registry . traceIs ( traceOut , 'noOpacity' ) ) {
1249+ coerce ( 'opacity' ) ;
1250+ }
12731251
12741252 if ( Registry . traceIs ( traceOut , 'notLegendIsolatable' ) ) {
12751253 // This clears out the legendonly state for traces like carpet that
12761254 // cannot be isolated in the legend
12771255 traceOut . visible = ! ! traceOut . visible ;
12781256 }
12791257
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+
12801267 if ( _module && _module . selectPoints ) {
12811268 coerce ( 'selectedpoints' ) ;
12821269 }
0 commit comments