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); });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.