add_event_handler#

Offset.add_event_handler(handler)#

Add an event handler. All added event handlers are called when this feature changes.

Used by Graphic classes to add to their event handlers, not meant for users. Users add handlers to Graphic instances only.

The handler must accept a FeatureEvent as the first and only argument.

Parameters:

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