Select to view content in your preferred language

Legend Flickering with Svelte

49
1
8 hours ago
CalebSchwind
New Contributor II

I'm using sveltekit and arcgis js api v4.30. The legend is flickering whenever a new layer is added (see gif below). This wasn't an issue in v4.28.

Any ideas on how to fix this?

CalebSchwind_0-1721336300656.gif

 

Below is a repository with an example of the issue.

To test: clone that repo, run "npm install", run "npm run dev", open http://localhost:5173/ in your browser, click the "Add Layer" button several times to see the flicker. 

https://github.com/cschwinderg/svelte-legend-flicker 

0 Kudos
1 Reply
Sage_Wall
Esri Contributor

Hi @CalebSchwind 

Thanks for posting.  I'm a SvelteKit fan too 😀.  I'm not sure what's going on here.  I noticed you were using a lot of async dynamic imports so my first thought was one of those might be holding things up but I doubt that's it after thinking more about it.  I wasn't able to repro in a vanilla JS codepen.  https://codepen.io/sagewall/pen/BagjEvV  There is a little shimmy as the first layer populates but the whole thing doesn't flicker like happens in SvelteKit.  I'll try and look at it closer and clone your repo tomorrow.

0 Kudos