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); });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.