-
Hi, The API docs for 'AttributionControlOptions' say that the default compact control will always collapse when moving the map, but then later say the default is a responsive attribution that collapses when the user moves the map on maps <640px wide, and attributions shouldn't be collapsed if it can comfortably fit on the map. Currently the default attribution collapses on move for any container width. Should this be staying open when > 640px? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
In #3618 the attribution was made compact by default. In my PR #795 before that, the compact mode was made to default to open It looks like to get the old behavior, you would need to set the compact option to 'undefined', which makes it default to the <640px wide compact, >640 not compact mode. Something like https://stackblitz.com/edit/web-platform-tqhkxm?file=index.html With compact mode set to true, the attribution is always open by default, like With compact mode set to false, the attribution always shows like With compact mode set to 'undefined', the old behavior happens. Under 640px it looks like |
Beta Was this translation helpful? Give feedback.
-
So the first part which says " the default compact control will always collapse when moving the map" seems correct But the second part you mentioned "the default is a responsive attribution that collapses when the user moves the map on maps <640px wide, and attributions shouldn't be collapsed if it can comfortably fit on the map." is outdated and was the old behavior. This behavior is seen by setting compact to 'undefined' now like in my example at https://stackblitz.com/edit/web-platform-tqhkxm?file=index.html |
Beta Was this translation helpful? Give feedback.
In #3618 the attribution was made compact by default. In my PR #795 before that, the compact mode was made to default to open
It looks like to get the old behavior, you would need to set the compact option to 'undefined', which makes it default to the <640px wide compact, >640 not compact mode. Something like https://stackblitz.com/edit/web-platform-tqhkxm?file=index.html
With compact mode set to true, the attribution is always open by default, like
but can also be collapsed (and collapses on move)
With compact mode set to false, the attribution always shows like
but can't be collapsed
With compact mode set to 'undefined', the old behavior happens. Under 640px it looks like
(with a col…