Hello all! I am looking for a way to deal with popups that open off-screen. If a Feature is near the edge of the Map sometimes the popup gets cutoff. I would like it to just move the popup to fit, not 'center' the popup.
I have seen MapBox applications that automatically quick pan the popup into full view on-click. I have also found a fiddle that has this same action that would work perfectly, altho I just cannot decipher how the code works to accomplish this? it seems to be using "view.watch" and "view.popup.features"?
https://jsfiddle.net/gavinr/1jLmfLLL/
(you will need to add your own Feature Service URL to make this fiddle work)
https://www.nps.gov/subjects/geology/geologic-resources-inventory-products.htm
(this is the MapBox app that has the action im looking for)
thx!
**another ESRI example- https://totalapis.github.io/sample-code/watch-for-changes/live/index.html