@@ -37,7 +37,7 @@ export class Scatter extends ScatterBase {
3737 this . listenTo ( this . model , "change:colors" , this . update_colors ) ;
3838 this . listenTo ( this . model , "change:stroke" , this . update_stroke ) ;
3939 this . listenTo ( this . model , "change:stroke_width" , this . update_stroke_width ) ;
40- this . listenTo ( this . model , "change:default_opacities " , this . update_default_opacities ) ;
40+ this . listenTo ( this . model , "change:opacities " , this . update_opacities ) ;
4141 this . listenTo ( this . model , "change:default_skew" , this . update_default_skew ) ;
4242 this . listenTo ( this . model , "change:marker" , this . update_marker ) ;
4343 this . listenTo ( this . model , "change:default_size" , this . update_default_size ) ;
@@ -108,26 +108,26 @@ export class Scatter extends ScatterBase {
108108 }
109109 }
110110
111- update_default_opacities ( animate ) {
111+ update_opacities ( animate ) {
112112 if ( ! this . model . dirty ) {
113- const default_opacities = this . model . get ( "default_opacities " ) ;
113+ const opacities = this . model . get ( "opacities " ) ;
114114 const colors = this . model . get ( "colors" ) ;
115115 const len = colors . length ;
116- const len_opac = default_opacities . length ;
116+ const len_opac = opacities . length ;
117117 const animation_duration = animate === true ? this . parent . model . get ( "animation_duration" ) : 0 ;
118118
119119 // update opacity scale range?
120120 const that = this ;
121121 this . d3el . selectAll ( ".dot" )
122- . transition ( "update_default_opacities " )
122+ . transition ( "update_opacities " )
123123 . duration ( animation_duration )
124124 . style ( "opacity" , function ( d , i ) {
125125 return that . get_element_opacity ( d , i ) ;
126126 } ) ;
127127 if ( this . legend_el ) {
128128 this . legend_el . select ( "path" )
129129 . style ( "opacity" , function ( d , i ) {
130- return default_opacities [ i % len_opac ] ;
130+ return opacities [ i % len_opac ] ;
131131 } )
132132 . style ( "fill" , function ( d , i ) {
133133 return colors [ i % len ] ;
@@ -271,7 +271,8 @@ export class Scatter extends ScatterBase {
271271 that = this ;
272272 elements
273273 . style ( "fill" , fill ? this . get_mark_color . bind ( this ) : "none" )
274- . style ( "stroke" , stroke ? stroke : this . get_mark_color . bind ( this ) ) . style ( "opacity" , function ( d , i ) {
274+ . style ( "stroke" , stroke ? stroke : this . get_mark_color . bind ( this ) )
275+ . style ( "opacity" , function ( d , i ) {
275276 return that . get_element_opacity ( d , i ) ;
276277 } ) . style ( "stroke-width" , stroke_width ) ;
277278 }
0 commit comments