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 20
20
" # Set up for JupyterLite\n " ,
21
21
" try:\n " ,
22
22
" import piplite\n " ,
23
- " await piplite.install([ 'ipyleaflet')\n " ,
23
+ " await piplite.install('ipyleaflet')\n " ,
24
24
" except ImportError:\n " ,
25
25
" pass"
26
26
]
Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ class Velocity(Layer):
71
71
max_velocity = Float (10 ).tag (sync = True , o = True )
72
72
velocity_scale = Float (0.005 ).tag (sync = True , o = True )
73
73
colormap = Any (linear .OrRd_06 )
74
- _color_scale = List ([]).tag (sync = True , o = True )
74
+ color_scale = List ([]).tag (sync = True , o = True )
75
75
76
- @default ('_color_scale ' )
76
+ @default ('color_scale ' )
77
77
def _default_color_scale (self ):
78
- self ._color_scale = []
78
+ self .color_scale = []
79
79
80
80
for color in self .colormap .colors :
81
81
rgb_tuple = tuple (int (x * 256 ) for x in color [:3 ])
82
82
rgb_str = f"rgb{ rgb_tuple } "
83
- self ._color_scale .append (rgb_str )
83
+ self .color_scale .append (rgb_str )
84
84
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 {
25
25
minVelocity : 0 ,
26
26
maxVelocity : 10 ,
27
27
velocityScale : 0.005 ,
28
- _colorScale : [ ]
28
+ colorScale : [ ]
29
29
} ;
30
30
}
31
31
}
@@ -60,13 +60,5 @@ export class LeafletVelocityView extends layer.LeafletLayerView {
60
60
} ,
61
61
this
62
62
) ;
63
- this . listenTo (
64
- this . model ,
65
- 'change:_colorScale' ,
66
- function ( ) {
67
- this . layer_views . update ( this . model . get ( '_colorScale' ) ) ;
68
- } ,
69
- this
70
- ) ;
71
63
}
72
64
}
You can’t perform that action at this time.
0 commit comments