add_event_handler#

LinearSelectionFeature.add_event_handler(handler)#

Add an event handler. All added event handlers are called when this feature changes. The handler can optionally accept a FeatureEvent as the first and only argument. The FeatureEvent only has two attributes, type which denotes the type of event as a str in the form of β€œ<feature_name>”, such as β€œcolor”. And pick_info which contains information about the event and Graphic that triggered it.

Parameters:

handler (callable) – a function to call when this feature changes