File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 2020    " # Set up for JupyterLite\n " 
2121    " try:\n " 
2222    "     import piplite\n " 
23-     "     await piplite.install([ 'ipyleaflet')\n " 
23+     "     await piplite.install('ipyleaflet')\n " 
2424    " except ImportError:\n " 
2525    "     pass" 
2626   ]
Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ class Velocity(Layer):
7171    max_velocity  =  Float (10 ).tag (sync = True , o = True )
7272    velocity_scale  =  Float (0.005 ).tag (sync = True , o = True )
7373    colormap  =  Any (linear .OrRd_06 )
74-     _color_scale  =  List ([]).tag (sync = True , o = True )
74+     color_scale  =  List ([]).tag (sync = True , o = True )
7575
76-     @default ('_color_scale ' ) 
76+     @default ('color_scale ' ) 
7777    def  _default_color_scale (self ):
78-         self ._color_scale  =  []
78+         self .color_scale  =  []
7979
8080        for  color  in  self .colormap .colors :
8181            rgb_tuple  =  tuple (int (x  *  256 ) for  x  in  color [:3 ])
8282            rgb_str  =  f"rgb{ rgb_tuple }  
83-             self ._color_scale .append (rgb_str )
83+             self .color_scale .append (rgb_str )
8484
85-         return  self ._color_scale 
85+         return  self .color_scale 
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class LeafletVelocityModel extends layer.LeafletLayerModel {
2525      minVelocity : 0 , 
2626      maxVelocity : 10 , 
2727      velocityScale : 0.005 , 
28-       _colorScale : [ ] 
28+       colorScale : [ ] 
2929    } ; 
3030  } 
3131} 
@@ -60,13 +60,5 @@ export class LeafletVelocityView extends layer.LeafletLayerView {
6060      } , 
6161      this 
6262    ) ; 
63-     this . listenTo ( 
64-       this . model , 
65-       'change:_colorScale' , 
66-       function  ( )  { 
67-         this . layer_views . update ( this . model . get ( '_colorScale' ) ) ; 
68-       } , 
69-       this 
70-     ) ; 
7163  } 
7264} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments