File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,17 @@ module.exports = {
114114 sizeref : scatterMarkerAttrs . sizeref ,
115115 sizemin : scatterMarkerAttrs . sizemin ,
116116 sizemode : scatterMarkerAttrs . sizemode ,
117- opacity : scatterMarkerAttrs . opacity ,
117+ opacity : extendFlat ( { } , scatterMarkerAttrs . opacity , {
118+ arrayOk : false ,
119+ description : [
120+ 'Sets the marker opacity.' ,
121+ 'Note that the marker opacity for scatter3d traces' ,
122+ 'must be a scalar value for performance reasons.' ,
123+ 'To set a blending opacity value' ,
124+ '(i.e. which is not transparent), set *marker.color*' ,
125+ 'to an rgba color and use its alpha channel.'
126+ ] . join ( ' ' )
127+ } ) ,
118128 colorscale : scatterMarkerAttrs . colorscale ,
119129 cauto : scatterMarkerAttrs . cauto ,
120130 cmax : scatterMarkerAttrs . cmax ,
Original file line number Diff line number Diff line change @@ -319,10 +319,9 @@ proto.update = function(data) {
319319 this . linePlot = null ;
320320 }
321321
322+ // N.B. marker.opacity must be a scalar for performance
322323 var scatterOpacity = data . opacity ;
323- if ( data . marker && typeof data . marker . opacity === 'number' ) {
324- scatterOpacity *= data . marker . opacity ;
325- }
324+ if ( data . marker && data . marker . opacity ) scatterOpacity *= data . marker . opacity ;
326325
327326 scatterOptions = {
328327 gl : gl ,
You can’t perform that action at this time.
0 commit comments