In the ArcGIS API 4.0 Beta 2 for JavaScript, how can I listen for the MapView's popup to open or close? Specifically, I need to run code when the user closes the popup. I tried this:
view.popup.on("hide", myFunction);
I tried this:
view.popup.on("blur", myFunction);
But neither of those events seems to exist for a Popup. How do I do it, or is it not possible?
Solved! Go to Solution.
Gary,
You need to watch the visible property.
view.popup.watch("visible", function(name, oldValue, newValue){ console.info(name, oldValue, newValue); })
Gary,
You need to watch the visible property.
view.popup.watch("visible", function(name, oldValue, newValue){ console.info(name, oldValue, newValue); })