File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ plots['triangle-mesh3d'] = require('@mocks/gl3d_triangle.json');
2626plots [ 'snowden' ] = require ( '@mocks/gl3d_snowden.json' ) ;
2727plots [ 'bunny' ] = require ( '@mocks/gl3d_bunny.json' ) ;
2828plots [ 'ribbons' ] = require ( '@mocks/gl3d_ribbons.json' ) ;
29- plots [ 'date -time' ] = require ( '@mocks/gl3d_scatter-date.json' ) ;
29+ plots [ 'scatter -time' ] = require ( '@mocks/gl3d_scatter-date.json' ) ;
3030plots [ 'cufflinks' ] = require ( '@mocks/gl3d_cufflinks.json' ) ;
3131plots [ 'chrisp-nan-1' ] = require ( '@mocks/gl3d_chrisp-nan-1.json' ) ;
3232plots [ 'marker-arrays' ] = require ( '@mocks/gl3d_marker-arrays.json' ) ;
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 @@ -318,10 +318,9 @@ proto.update = function(data) {
318318 this . linePlot = null ;
319319 }
320320
321+ // N.B. marker.opacity must be a scalar for performance
321322 var scatterOpacity = data . opacity ;
322- if ( data . marker && typeof data . marker . opacity === 'number' ) {
323- scatterOpacity *= data . marker . opacity ;
324- }
323+ if ( data . marker && data . marker . opacity ) scatterOpacity *= data . marker . opacity ;
325324
326325 scatterOptions = {
327326 gl : gl ,
You can’t perform that action at this time.
0 commit comments