I have an SVG image which I’m displaying within a jupyterlab notebook:
d = ipywidgets.Output() with d: IPython.display.display(IPython.display.SVG(data=...))
I’d like to get callbacks when the image is clicked on, to let me change the contents of other widgets in response. The ipywidgets.Output() widget does have an observe() method, but my handler doesn’t get called. I think observe() on an Output widget doesn’t do what I’m trying to achieve.
Is there a way to do this?
Is there an alternate way to put an image in a Jupyterlab notebook which would be easier to implement callbacks from clicking on the image?