<?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>topic Customize NavigationToggle in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488882#M84831</link>
    <description>&lt;P&gt;The default esri SceneView (3D only) provides the NavigationToggle component which toggles between "Pan" and "Rotate" mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lawsonkendall_0-1718113323724.png" style="width: 41px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106731iDBE3640462CF6DF4/image-dimensions/41x63?v=v2" width="41" height="63" role="button" title="lawsonkendall_0-1718113323724.png" alt="lawsonkendall_0-1718113323724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a task to update the appearance (using our own custom png images) and tooltip styles for this component.&amp;nbsp; The core question is, is there a relatively simple way to specify my own buttons/images for the&amp;nbsp;NavigationToggle interface, and also to specify the tooltip styles for the same?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a CodePen which removes the esri built-in NavigationToggle and makes a naive attempt to implement my own by toggling the value of&amp;nbsp;view.navigation.browserTouchPanEnabled.&amp;nbsp; &lt;A href="https://codepen.io/lawken/pen/RwmLaYV" target="_blank" rel="noopener"&gt;https://codepen.io/lawken/pen/RwmLaYV&lt;/A&gt;&amp;nbsp; Of course, it doesn't work, but maybe this is enough of a platform to support discussion of the right way forward.&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;The production version of this is a bit more complicated, of course, being in an Angular app, using Material for button styles, but if I can figure out how to customize the NavigationToggle in the CodePen, I can transfer the concept to the app.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 14:36:40 GMT</pubDate>
    <dc:creator>lawsonkendall</dc:creator>
    <dc:date>2024-06-11T14:36:40Z</dc:date>
    <item>
      <title>Customize NavigationToggle</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488882#M84831</link>
      <description>&lt;P&gt;The default esri SceneView (3D only) provides the NavigationToggle component which toggles between "Pan" and "Rotate" mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lawsonkendall_0-1718113323724.png" style="width: 41px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106731iDBE3640462CF6DF4/image-dimensions/41x63?v=v2" width="41" height="63" role="button" title="lawsonkendall_0-1718113323724.png" alt="lawsonkendall_0-1718113323724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a task to update the appearance (using our own custom png images) and tooltip styles for this component.&amp;nbsp; The core question is, is there a relatively simple way to specify my own buttons/images for the&amp;nbsp;NavigationToggle interface, and also to specify the tooltip styles for the same?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a CodePen which removes the esri built-in NavigationToggle and makes a naive attempt to implement my own by toggling the value of&amp;nbsp;view.navigation.browserTouchPanEnabled.&amp;nbsp; &lt;A href="https://codepen.io/lawken/pen/RwmLaYV" target="_blank" rel="noopener"&gt;https://codepen.io/lawken/pen/RwmLaYV&lt;/A&gt;&amp;nbsp; Of course, it doesn't work, but maybe this is enough of a platform to support discussion of the right way forward.&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;The production version of this is a bit more complicated, of course, being in an Angular app, using Material for button styles, but if I can figure out how to customize the NavigationToggle in the CodePen, I can transfer the concept to the app.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 14:36:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488882#M84831</guid>
      <dc:creator>lawsonkendall</dc:creator>
      <dc:date>2024-06-11T14:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Customize NavigationToggle</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488915#M84832</link>
      <description>&lt;P&gt;2 thoughts:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Perhaps removing the navigation-toggle is my first mistake.&amp;nbsp; If I can figure out a way to associate my own button(s) with the built-in &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html" target="_self"&gt;NavigationToggle&lt;/A&gt; instance, that would probably solve (almost) everything.&lt;/LI&gt;&lt;LI&gt;This is lowering the bar a bit, but original task was to change the style the tooltip (to be consistent with other component tooltips on the page).&amp;nbsp; If it's not possible to specify my own button(s)/images for the component, but I can at least find the class (or id) of the tooltip, that might be "good enough".&amp;nbsp; That's actually where I started, but from various posts I've read, Esri seems to use js to dynamically create the tooltip element on the fly, based on the title of the containing component element.&amp;nbsp; I tried all kinds of tricks to trap the NavigationToggle tooltip in Chrome Dev Tools "Element" inspector, but never had any luck -- which ultimately led to me thinking, if I could just provide my own component to do the&amp;nbsp;NavigationToggle&amp;nbsp; action (as I already do for the Zoom In/Out actions), I would get the consistent tooltip style "for free", and I would have the added bonus of being able to give the NavigationToggle a look and feel consistent with the other components I've provided.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 11 Jun 2024 14:53:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488915#M84832</guid>
      <dc:creator>lawsonkendall</dc:creator>
      <dc:date>2024-06-11T14:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Customize NavigationToggle</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488963#M84833</link>
      <description>&lt;P&gt;You might want to look at building your own custom UI element that covers what you need. You can use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle-NavigationToggleViewModel.html" target="_blank" rel="noopener"&gt;NavigationToggleViewModel&lt;/A&gt; to handle the logic and build a custom UI around that. You can do it in your framework of choice or a vanilla HTML/JS element.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 16:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488963#M84833</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2024-06-11T16:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Customize NavigationToggle</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488976#M84834</link>
      <description>&lt;P&gt;I found the solution.&amp;nbsp;&amp;nbsp;&lt;A href="https://codepen.io/lawken/pen/eYaGVEb?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/lawken/pen/eYaGVEb?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The main thing is to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Retrieve the default constructed NavigationToggle instance from the SceneView.ui. (Don't "remove()" it.)&lt;/LI&gt;&lt;LI&gt;Set "visible = false" on that instance.&lt;/LI&gt;&lt;LI&gt;Call "toggle()" on that instance to switch modes.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 11 Jun 2024 21:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488976#M84834</guid>
      <dc:creator>lawsonkendall</dc:creator>
      <dc:date>2024-06-11T21:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Customize NavigationToggle</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488978#M84835</link>
      <description>&lt;P&gt;I'll take a look at that, in case hiding the built-in NavigationToggle turns out to be more difficult than expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 17:13:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-navigationtoggle/m-p/1488978#M84835</guid>
      <dc:creator>lawsonkendall</dc:creator>
      <dc:date>2024-06-11T17:13:13Z</dc:date>
    </item>
  </channel>
</rss>

