From c9d65cde3323ebe708a1aaca084183d22ced1c55 Mon Sep 17 00:00:00 2001 From: David Bau Date: Fri, 22 Jul 2022 20:37:23 -0400 Subject: [PATCH] Use event location property. --- notebooks/using_show_and_widgets.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/using_show_and_widgets.ipynb b/notebooks/using_show_and_widgets.ipynb index a29c0f4..86903a5 100644 --- a/notebooks/using_show_and_widgets.ipynb +++ b/notebooks/using_show_and_widgets.ipynb @@ -511,7 +511,7 @@ "from baukit import Textbox\n", "coord_b = Textbox()\n", "def handle_click(e):\n", - " loc = e.target.event_location(e)\n", + " loc = e.location\n", " coord_b.value = f'x,y=({loc.x:.2f}, {loc.y:.2f}) inside={loc.inside}'\n", "pw.on('click', handle_click)\n", "show(show.TIGHT, [['Click the previous plot to see coordinates here:', coord_b]])"