Answer the question
In order to leave comments, you need to log in
Why does the custom description slide down when the map is initialized?
When loading the map, you can see the open label description, if you close it by clicking on the map, and then open it by clicking on the balloon image, then the label description will move higher (as it should). Why does the label's custom description appear lower during initialization? How can this be corrected?
Link to example
Answer the question
In order to leave comments, you need to log in
Why does the label's custom description appear lower during initialization?
applyElementOffset
.mapBalloon
it does not contain content and is 60px in height (empty container + padding 30px above and below) .mapBalloon-arrow
also with zero height, from which 12 is subtracted. this._$element.css({
left: -(this._$element[0].offsetWidth / 2),
top: -(this._$element[0].offsetHeight // 60
+ this._$element.find('.mapBalloon-arrow')[0].offsetHeight - 12 // -12
// top: -48px
)});
applyElementOffset
after you fill the balloon with content
The author, you were given a sensible answer, why didn’t you mark it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question