AnsweredAssumed Answered

Is there a way to animate a padding change?

Question asked by futurerad on Aug 6, 2019
Latest reply on Aug 8, 2019 by odoe

Hi Everyone,


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 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. 


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?


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.


Any ideas welcome.