<?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 Re: Is there a way to animate a padding change? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636345#M59465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, so you want to have padding on the map portion of the page without having it impact the UI (widgets) portion of the page? I'll get this feedback into our pipeline. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2019 14:44:10 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2019-08-08T14:44:10Z</dc:date>
    <item>
      <title>Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636341#M59461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have a map where I show some custom data at the bottom of the map and it kind of obscures the view. My code&amp;nbsp;currently calculates the height of the data div and adds that dimension in padding to the bottom of the map to make the centring more pleasant.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that it is a hard change to the map and does not cleanly animate to the new position. Is there currently a way to animate a padding change using the javascript API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually centre the map at the same time, so perhaps there is a way to calculate an offset size into the new centre before I centre the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ryann,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 14:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636341#M59461</guid>
      <dc:creator>RyannGalea</dc:creator>
      <dc:date>2019-08-06T14:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636342#M59462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use requestAnimationFrame to do smooth animations in your app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample that does what I think you are looking for.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/zPJKeE?editors=0010"&gt;https://codepen.io/odoe/pen/zPJKeE?editors=0010&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 15:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636342#M59462</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2019-08-06T15:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636343#M59463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd also like to give a quick shout out to&amp;nbsp;&lt;A href="https://d3js.org/"&gt;D3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really want to jazz it up you can use transition easing:&lt;/P&gt;&lt;P&gt;&lt;A href="https://bl.ocks.org/d3noob/1ea51d03775b9650e8dfd03474e202fe"&gt;https://bl.ocks.org/d3noob/1ea51d03775b9650e8dfd03474e202fe&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: This wouldn't help in your case I'm just a fan of their animations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 16:46:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636343#M59463</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-08-06T16:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636344#M59464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after playing with the padding, it was evident it didn't really match what I was after. By adding the padding it pushed up any widgets I had along the bottom of the map which was not the desired effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I really needed was a function that would offset the centre point in pixels and zoom to that location instead, this was to account for any information I am showing along the bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, I supply a longitude, latitude &amp;amp; and offset object with values in pixels, which then calculates the pixel offset and returns the new longitude &amp;amp; latitude.&lt;/P&gt;&lt;P&gt;There may be an easier way to do this but this is what I ended up with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the main function&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="456607" alt="Main Function" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/456607_funct.jpg" /&gt;&lt;/P&gt;&lt;P&gt;MapOffset interface&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="456608" alt="Interface" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/456608_interface.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto Function&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="456609" alt="Goto Function" class="jive-emoji jive-image image-3 j-img-original" src="https://community.esri.com/legacyfs/online/456609_allfunc.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling it&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="456610" alt="Call" class="jive-emoji jive-image image-4 j-img-original" src="https://community.esri.com/legacyfs/online/456610_callgoto.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Video Example of it working:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://youtu.be/ymU8g9-6XLs" title="https://youtu.be/ymU8g9-6XLs"&gt;Using a pixel offset with Esri - YouTube&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of the offset.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="456611" alt="" class="jive-emoji jive-image image-5 j-img-original" src="https://community.esri.com/legacyfs/online/456611_example.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 11:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636344#M59464</guid>
      <dc:creator>RyannGalea</dc:creator>
      <dc:date>2019-08-08T11:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636345#M59465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, so you want to have padding on the map portion of the page without having it impact the UI (widgets) portion of the page? I'll get this feedback into our pipeline. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 14:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/636345#M59465</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2019-08-08T14:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to animate a padding change?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/1028715#M71825</link>
      <description>&lt;P&gt;This would be a very nice feature!&lt;BR /&gt;&lt;BR /&gt;Personally, I would be looking for something like this with the option to offset the same way as with the UI padding:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await view.goTo(graphic, {
  padding: {
    bottom: 300,
  },
  animate: true,
  duration: 500,
  easing: 'ease-in',
})&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Feb 2021 20:31:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-animate-a-padding-change/m-p/1028715#M71825</guid>
      <dc:creator>Joel-Hickok-1978</dc:creator>
      <dc:date>2021-02-19T20:31:46Z</dc:date>
    </item>
  </channel>
</rss>

