2323
2424__all__ = ['ImageWidget' ]
2525
26- # Allowed locations for cursor display
27- ALLOWED_CURSOR_LOCATIONS = ['top' , 'bottom' , None ]
28-
29- # List of marker names that are for internal use only
30- RESERVED_MARKER_SET_NAMES = ['all' ]
31-
3226
3327class ImageWidget (ipyw .VBox ):
3428 """
@@ -55,6 +49,11 @@ class ImageWidget(ipyw.VBox):
5549 correct value to use.*
5650
5751 """
52+ # Allowed locations for cursor display
53+ ALLOWED_CURSOR_LOCATIONS = ('top' , 'bottom' , None )
54+
55+ # List of marker names that are for internal use only
56+ RESERVED_MARKER_SET_NAMES = ('all' , )
5857
5958 def __init__ (self , logger = None , image_width = 500 , image_height = 500 ,
6059 pixel_coords_offset = 0 , ** kwargs ):
@@ -648,11 +647,11 @@ def _validate_marker_name(self, marker_name):
648647 """
649648 Raise an error if the marker_name is not allowed.
650649 """
651- if marker_name in RESERVED_MARKER_SET_NAMES :
650+ if marker_name in self . RESERVED_MARKER_SET_NAMES :
652651 raise ValueError ('The marker name {} is not allowed. Any name is '
653652 'allowed except these: '
654653 '{}' .format (marker_name ,
655- ', ' .join (RESERVED_MARKER_SET_NAMES )))
654+ ', ' .join (self . RESERVED_MARKER_SET_NAMES )))
656655
657656 def add_markers (self , table , x_colname = 'x' , y_colname = 'y' ,
658657 skycoord_colname = 'coord' , use_skycoord = False ,
@@ -888,7 +887,7 @@ def cursor(self, val):
888887 else :
889888 raise ValueError ('Invalid value {} for cursor.'
890889 'Valid values are: '
891- '{}' .format (val , ALLOWED_CURSOR_LOCATIONS ))
890+ '{}' .format (val , self . ALLOWED_CURSOR_LOCATIONS ))
892891 self ._cursor = val
893892
894893 @property
0 commit comments