@@ -139,13 +139,13 @@ def __init__(
139139 if axis == "x" :
140140 mesh = pygfx .Mesh (
141141 pygfx .box_geometry (1 , size , 1 ),
142- pygfx .MeshBasicMaterial (color = pygfx .Color (fill_color )),
142+ pygfx .MeshBasicMaterial (color = pygfx .Color (fill_color ), pick_write = True ),
143143 )
144144
145145 elif axis == "y" :
146146 mesh = pygfx .Mesh (
147147 pygfx .box_geometry (size , 1 , 1 ),
148- pygfx .MeshBasicMaterial (color = pygfx .Color (fill_color )),
148+ pygfx .MeshBasicMaterial (color = pygfx .Color (fill_color ), pick_write = True ),
149149 )
150150 else :
151151 raise ValueError ("`axis` must be one of 'x' or 'y'" )
@@ -169,7 +169,9 @@ def __init__(
169169
170170 left_line = pygfx .Line (
171171 pygfx .Geometry (positions = left_line_data ),
172- pygfx .LineMaterial (thickness = edge_thickness , color = edge_color ),
172+ pygfx .LineMaterial (
173+ thickness = edge_thickness , color = edge_color , pick_write = True
174+ ),
173175 )
174176
175177 # position data for the right edge line
@@ -182,7 +184,9 @@ def __init__(
182184
183185 right_line = pygfx .Line (
184186 pygfx .Geometry (positions = right_line_data ),
185- pygfx .LineMaterial (thickness = edge_thickness , color = edge_color ),
187+ pygfx .LineMaterial (
188+ thickness = edge_thickness , color = edge_color , pick_write = True
189+ ),
186190 )
187191
188192 self .edges : Tuple [pygfx .Line , pygfx .Line ] = (left_line , right_line )
@@ -198,7 +202,9 @@ def __init__(
198202
199203 bottom_line = pygfx .Line (
200204 pygfx .Geometry (positions = bottom_line_data ),
201- pygfx .LineMaterial (thickness = edge_thickness , color = edge_color ),
205+ pygfx .LineMaterial (
206+ thickness = edge_thickness , color = edge_color , pick_write = True
207+ ),
202208 )
203209
204210 # position data for the right edge line
@@ -211,7 +217,9 @@ def __init__(
211217
212218 top_line = pygfx .Line (
213219 pygfx .Geometry (positions = top_line_data ),
214- pygfx .LineMaterial (thickness = edge_thickness , color = edge_color ),
220+ pygfx .LineMaterial (
221+ thickness = edge_thickness , color = edge_color , pick_write = True
222+ ),
215223 )
216224
217225 self .edges : Tuple [pygfx .Line , pygfx .Line ] = (bottom_line , top_line )
0 commit comments