File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 7171 if ( this . getProjection ( ) && typeof this . position . lng == 'function' ) {
7272 console . log ( _this . getProjection ( ) ) ;
7373 var setPosition = function ( ) {
74+ if ( ! _this . getProjection ( ) ) { return ; }
7475 var posPixel = _this . getProjection ( ) . fromLatLngToDivPixel ( _this . position ) ;
7576 var x = Math . round ( posPixel . x - ( _this . el . offsetWidth / 2 ) ) ;
7677 var y = Math . round ( posPixel . y - _this . el . offsetHeight - 10 ) ; // 10px for anchor
7778 _this . el . style . left = x + "px" ;
7879 _this . el . style . top = y + "px" ;
7980 _this . el . style . visibility = "visible" ;
8081 } ;
81- if ( _this . el . offsetWidth && _this . el . offsetHeight ) {
82+ if ( _this . el . offsetWidth && _this . el . offsetHeight ) {
8283 setPosition ( ) ;
8384 } else {
8485 //delayed left/top calculation when width/height are not set instantly
You can’t perform that action at this time.
0 commit comments