A custom label is drawn on the map, the position of which is calculated from the coordinates of the label to which it is attached.
Drawing example: https://jsfiddle.net/d1eL2h5m/21/
The problem is that in the process of scaling from the beginning of the event to the end, a function is started that calculates the label's position, but if at the end of scaling and at the beginning the top and left pixels of the position are calculated correctly, then the process itself produces very large values and the label flies in the side of the card. Dragging a map with a mouse also calculates the position of the label, but with such an event, everything is correct and the label always remains under the label.
In the process of scaling the position is calculated as follows:
_reposzoom: function() { global = YMYmap.options.get('projection').toGlobalPixels([55.752, 37.627], YMYmap.getZoom()); var position = YMYmap.converter.globalToPage(global); offset = YMYmap.container.getOffset(); this.options.set('position',{ top: position[1] - offset[1], left: position[0] - offset[0] - parseInt(this._$content.parent().outerWidth())/2}); this._$content.parent().css({ left : position[0] - offset[0] - parseInt(this._$content.parent().outerWidth())/2 + 'px', top : position[1] - offset[1] + 'px' }); } How to ensure that the label does not fly to the side of the map during scaling and remains under the label?