Is there a way to have an event triggered when the Expand widget actually expand or collaspe ?
I would like to show or hide a DistanceMeasurement2D on the map accordingly.
Thanks.
This can be easily achieved using the watch function of the widget and the expanded state.
const bgExpand = new Expand({ view: view, content: basemapGallery }); // create a watch to trigger an event whenever expanded value changes. bgExpand.watch("expanded", (expanded) => { console.log(expanded); });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.