GCWidget.on()
Call a function at each event of a kind.
Unlike observe() on the attribute, the function is also called when the same event happens twice, such as a second click on the same gene.
Usage
python
widget.on(event, callback, remove=False)widget is a GCWidget.
Arguments
| Argument | Type | Description |
|---|---|---|
event | str | The event: "click", "dblclick", "select", "selection", "drag", "moves", "zoom" or "rendered". |
callback | callable | Called with the event's payload. |
remove | bool | Whether to stop calling the function instead. Default False. |
Errors
| Error | When |
|---|---|
ValueError | When there is no such event. |
