@@ -26,7 +26,7 @@ class NicePlotter(Viewer):
2626 pf_active = param .ClassSelector (class_ = IDSToplevel , precedence = - 1 )
2727 plasma_shape = param .ClassSelector (class_ = PlasmaShape , precedence = - 1 )
2828 plasma_properties = param .ClassSelector (class_ = PlasmaProperties , precedence = - 1 )
29- nice_mode = param .Parameter (precedence = - 1 , allow_refs = True )
29+ nice_mode = param .Selector (precedence = - 1 , allow_refs = True )
3030
3131 # Plot parameters
3232 show_contour = param .Boolean (default = True , label = "Show contour lines" )
@@ -88,6 +88,15 @@ def __init__(self, **params):
8888 self .profiles_pane = pn .pane .HoloViews (
8989 profiles_plot , width = self .PROFILE_WIDTH , height = self .PROFILE_HEIGHT
9090 )
91+ self .panel_layout = pn .Param (
92+ self .param ,
93+ show_name = False ,
94+ widgets = {
95+ "show_desired_shape" : {
96+ "visible" : self .param .nice_mode .rx () == NiceSettings .INVERSE_MODE
97+ }
98+ },
99+ )
91100
92101 @pn .depends ("plasma_properties.profile_updated" )
93102 def _plot_profiles (self ):
@@ -392,12 +401,4 @@ def _plot_xo_points(self):
392401 return o_scatter * x_scatter
393402
394403 def __panel__ (self ):
395- return pn .Param (
396- self .param ,
397- show_name = False ,
398- widgets = {
399- "show_desired_shape" : {
400- "visible" : self .param .nice_mode .rx () == NiceSettings .INVERSE_MODE
401- }
402- },
403- )
404+ return self .panel_layout
0 commit comments