We recently migrated our ArcGIS Maps SDK widgets to map components as Esri will deprecate the traditional widgets.
In our use case, we visually nest our widgets into Expand widgets. The user clicks on an Expand button to activate a certain 3D tool:
In the example of the ShadowCast widget shown in the screenshot above, this makes sure that the red shadow is displayed / casted only when the widget is launched by the user. Also, the user can resume to the previous widget state. Another advantage is, that the performance of the scene doesn’t degrade as the user can selectively start a certain widget.
Before our migration, we watched the expanded state of the button continuously to start or stop the respective nested widget via the “visible” property:
reactiveUtils.watch(
() => sliceExpand?.expanded,
(expanded) => {
sliceWidget.visible = expanded;
}
);
After our migration to map components, I tried to reimplement this use case. As the “visible” property doesn’t exist anymore, I noticed, that there exist start() and stop() methods I can potentially use. However, I noticed the following:
To highlight the desired behavior and the old implementation with conventional widgets, I have attached three videos.
To highlight the current behavior with components, I created a pen: https://codepen.io/Stezi/pen/zxGqaWv?editors=1000
Thanks for reaching out, that's important input! We'll look into this and I might get back to you with additional questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.