@@ -2022,9 +2022,7 @@ def set_props(self, **props):
2022
2022
in the selector docstring to know which properties are supported.
2023
2023
"""
2024
2024
artist = self ._selection_artist
2025
- alias_map = getattr (artist , '_alias_map' , None )
2026
- if alias_map :
2027
- props = cbook .normalize_kwargs (props , alias_map )
2025
+ props = cbook .normalize_kwargs (props , artist )
2028
2026
artist .set (** props )
2029
2027
if self .useblit :
2030
2028
self .update ()
@@ -2040,9 +2038,7 @@ def set_handle_props(self, **handle_props):
2040
2038
raise NotImplementedError ("This selector doesn't have handles." )
2041
2039
2042
2040
artist = self ._handles_artists [0 ]
2043
- alias_map = getattr (artist , '_alias_map' , None )
2044
- if alias_map :
2045
- handle_props = cbook .normalize_kwargs (handle_props , alias_map )
2041
+ handle_props = cbook .normalize_kwargs (handle_props , artist )
2046
2042
for handle in self ._handles_artists :
2047
2043
handle .set (** handle_props )
2048
2044
if self .useblit :
@@ -2178,7 +2174,7 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
2178
2174
# Setup handles
2179
2175
self ._handle_props = {
2180
2176
'color' : props .get ('facecolor' , 'r' ),
2181
- ** cbook .normalize_kwargs (handle_props , Line2D . _alias_map )}
2177
+ ** cbook .normalize_kwargs (handle_props , Line2D )}
2182
2178
2183
2179
if self ._interactive :
2184
2180
self ._edge_order = ['min' , 'max' ]
@@ -2824,7 +2820,7 @@ def __init__(self, ax, onselect, drawtype='box',
2824
2820
self ._handle_props = {
2825
2821
'markeredgecolor' : (self ._props or {}).get (
2826
2822
'edgecolor' , 'black' ),
2827
- ** cbook .normalize_kwargs (handle_props , Line2D . _alias_map )}
2823
+ ** cbook .normalize_kwargs (handle_props , Line2D )}
2828
2824
2829
2825
self ._corner_order = ['NW' , 'NE' , 'SE' , 'SW' ]
2830
2826
xc , yc = self .corners
@@ -2863,8 +2859,8 @@ def __init__(self, ax, onselect, drawtype='box',
2863
2859
2864
2860
@property
2865
2861
def _handles_artists (self ):
2866
- return (self ._center_handle .artists + self ._corner_handles .artists +
2867
- self ._edge_handles .artists )
2862
+ return (* self ._center_handle .artists , * self ._corner_handles .artists ,
2863
+ * self ._edge_handles .artists )
2868
2864
2869
2865
def _press (self , event ):
2870
2866
"""Button press event handler."""
@@ -3498,8 +3494,7 @@ def _onmove(self, event):
3498
3494
else :
3499
3495
# Calculate distance to the start vertex.
3500
3496
x0 , y0 = self ._selection_artist .get_transform ().transform (
3501
- (self ._xs [0 ],
3502
- self ._ys [0 ])
3497
+ (self ._xs [0 ], self ._ys [0 ])
3503
3498
)
3504
3499
v0_dist = np .hypot (x0 - event .x , y0 - event .y )
3505
3500
# Lock on to the start vertex if near it and ready to complete.
0 commit comments