Answer the question
In order to leave comments, you need to log in
How to write a script reload in a script?
On the page, when you click on a certain area, the map container block expands, and the map itself remains the same size as when the page was loaded.
How to make the script update (not the whole page) to the new dimensions?
document.getElementById('kompoziciya-25e95c19281532').onclick = function() {
document.getElementById('map__container').classList.add('map__container--composition2');
};
Answer the question
In order to leave comments, you need to log in
If this is a Yandex map, then there is a method for such a case
ymap.container.fitToViewport();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question