<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Migrate stop / resume widget functionality to components in ArcGIS JavaScript Maps SDK Ideas</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idi-p/1622204</link>
    <description>&lt;P&gt;We recently migrated our ArcGIS Maps SDK widgets to map components as Esri will &lt;A href="https://developers.arcgis.com/javascript/latest/components-transition-plan/" target="_blank" rel="noopener"&gt;deprecate the traditional widgets&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanUseldinger_0-1749539518767.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/134105i3B7049AF0C925C4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanUseldinger_0-1749539518767.png" alt="StefanUseldinger_0-1749539518767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Before our migration, we watched the expanded state of the button continuously to start or stop the respective nested widget via the “visible” property: &amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.watch(
    () =&amp;gt; sliceExpand?.expanded,
    (expanded) =&amp;gt; {
        sliceWidget.visible = expanded;
    }
);&lt;/LI-CODE&gt;&lt;P&gt;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:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-line-of-sight/#methods" target="_blank" rel="noopener"&gt;LineOfSight&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-elevation-profile/#methods" target="_blank" rel="noopener"&gt;ElevationProfile&lt;/A&gt; widgets, it is not possible to implement the same behavior with the start() and stop() methods. The lines drawn by the user disappear only when the widget is reopened (start() method called). They stay visible even though the stop() method is called.&lt;/LI&gt;&lt;LI&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-slice/#methods" target="_blank" rel="noopener"&gt;Slice&lt;/A&gt; widget has no stop() method. This means, I cannot stop/resume the slice performed by the user in the scene as it remains visible the whole time.&lt;/LI&gt;&lt;LI&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#methods-summary" target="_blank" rel="noopener"&gt;Measurement&lt;/A&gt;, &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-weather/#methods" target="_blank" rel="noopener"&gt;Weather&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-daylight/#methods" target="_blank" rel="noopener"&gt;Daylight&lt;/A&gt; widgets don’t offer any of these two methods. For the Weather and Daylight widgets, this is ok for me. However, in the example of the measurement widget, I cannot remove the measurement lines drawn by the user from the scene.&lt;/LI&gt;&lt;LI&gt;The ShadowCast widget works fine.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;To highlight the desired behavior and the old implementation with conventional widgets, I have attached three videos.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To highlight the current behavior with components, I created a pen: &lt;A href="https://codepen.io/Stezi/pen/zxGqaWv?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/Stezi/pen/zxGqaWv?editors=1000&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jun 2025 07:37:17 GMT</pubDate>
    <dc:creator>StefanUseldinger</dc:creator>
    <dc:date>2025-06-10T07:37:17Z</dc:date>
    <item>
      <title>Migrate stop / resume widget functionality to components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idi-p/1622204</link>
      <description>&lt;P&gt;We recently migrated our ArcGIS Maps SDK widgets to map components as Esri will &lt;A href="https://developers.arcgis.com/javascript/latest/components-transition-plan/" target="_blank" rel="noopener"&gt;deprecate the traditional widgets&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanUseldinger_0-1749539518767.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/134105i3B7049AF0C925C4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanUseldinger_0-1749539518767.png" alt="StefanUseldinger_0-1749539518767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Before our migration, we watched the expanded state of the button continuously to start or stop the respective nested widget via the “visible” property: &amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.watch(
    () =&amp;gt; sliceExpand?.expanded,
    (expanded) =&amp;gt; {
        sliceWidget.visible = expanded;
    }
);&lt;/LI-CODE&gt;&lt;P&gt;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:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-line-of-sight/#methods" target="_blank" rel="noopener"&gt;LineOfSight&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-elevation-profile/#methods" target="_blank" rel="noopener"&gt;ElevationProfile&lt;/A&gt; widgets, it is not possible to implement the same behavior with the start() and stop() methods. The lines drawn by the user disappear only when the widget is reopened (start() method called). They stay visible even though the stop() method is called.&lt;/LI&gt;&lt;LI&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-slice/#methods" target="_blank" rel="noopener"&gt;Slice&lt;/A&gt; widget has no stop() method. This means, I cannot stop/resume the slice performed by the user in the scene as it remains visible the whole time.&lt;/LI&gt;&lt;LI&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#methods-summary" target="_blank" rel="noopener"&gt;Measurement&lt;/A&gt;, &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-weather/#methods" target="_blank" rel="noopener"&gt;Weather&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-daylight/#methods" target="_blank" rel="noopener"&gt;Daylight&lt;/A&gt; widgets don’t offer any of these two methods. For the Weather and Daylight widgets, this is ok for me. However, in the example of the measurement widget, I cannot remove the measurement lines drawn by the user from the scene.&lt;/LI&gt;&lt;LI&gt;The ShadowCast widget works fine.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;To highlight the desired behavior and the old implementation with conventional widgets, I have attached three videos.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To highlight the current behavior with components, I created a pen: &lt;A href="https://codepen.io/Stezi/pen/zxGqaWv?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/Stezi/pen/zxGqaWv?editors=1000&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 07:37:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idi-p/1622204</guid>
      <dc:creator>StefanUseldinger</dc:creator>
      <dc:date>2025-06-10T07:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate stop / resume widget functionality to components - Status changed to: Under Consideration</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1622259#M405</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/56592"&gt;@StefanUseldinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reaching out, that's important input! We'll look into this and I might get back to you with additional questions.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 12:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1622259#M405</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2025-06-10T12:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate stop / resume widget functionality to components - Status changed to: Open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1629880#M414</link>
      <description>&lt;P&gt;Hi again,&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, do I get it correctly that you're mainly looking for a way to hide and show again (not only clear) the measurement/slice from the view? e.g. that when closing the measurement tool, the line/area would disappear but when expanding the tool again, the previously created one reappears.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the two measurement components, Slice and Line Of Sight I can give you a workaround until we add the missing capabilities to them: you can use the analysis object connected to the component to toggle its visibility (or clear the analysis). See this app with Line Of Sight as an example:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://codepen.io/gsoosalu/pen/pvJXomZ" target="_blank"&gt;https://codepen.io/gsoosalu/pen/pvJXomZ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In case of the Elevation Profile, I don't have a workaround at the moment but we are currently working on this component and hope to provide the missing capabilities in the upcoming releases.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 14:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1629880#M414</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2025-07-03T14:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate stop / resume widget functionality to components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1630545#M415</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;First, do I get it correctly that you're mainly looking for a way to hide and show again (not only clear) the measurement/slice from the view? e.g. that when closing the measurement tool, the line/area would disappear but when expanding the tool again, the previously created one reappears.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's correct.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;For the two measurement components, Slice and Line Of Sight I can give you a workaround until we add the missing capabilities to them: you can use the analysis object connected to the component to toggle its visibility (or clear the analysis). See this app with Line Of Sight as an example:&amp;nbsp;&lt;BR /&gt;&lt;P&gt;&lt;A href="https://codepen.io/gsoosalu/pen/pvJXomZ" target="_blank" rel="nofollow noopener noreferrer"&gt;https://codepen.io/gsoosalu/pen/pvJXomZ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In case of the Elevation Profile, I don't have a workaround at the moment but we are currently working on this component and hope to provide the missing capabilities in the upcoming releases.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;These are good news. Thanks for the feedback and the code sample!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 05:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/migrate-stop-resume-widget-functionality-to/idc-p/1630545#M415</guid>
      <dc:creator>StefanUseldinger</dc:creator>
      <dc:date>2025-07-07T05:47:09Z</dc:date>
    </item>
  </channel>
</rss>

