@@ -1961,6 +1961,26 @@ Nicholas McCready - https://twitter.com/nmccready
19611961
19621962} ) . call ( this ) ;
19631963
1964+ ( function ( ) {
1965+ angular . module ( "google-maps.directives.api.utils" . ns ( ) ) . factory ( "ChromeFixes" . ns ( ) , [
1966+ function ( ) {
1967+ return {
1968+ maybeRepaint : function ( el ) {
1969+ var od ;
1970+ if ( el ) {
1971+ od = el . style . display ;
1972+ el . style . display = 'none' ;
1973+ return _ . defer ( function ( ) {
1974+ return el . style . display = od ;
1975+ } ) ;
1976+ }
1977+ }
1978+ } ;
1979+ }
1980+ ] ) ;
1981+
1982+ } ) . call ( this ) ;
1983+
19641984( function ( ) {
19651985 var __bind = function ( fn , me ) { return function ( ) { return fn . apply ( me , arguments ) ; } ; } ,
19661986 __hasProp = { } . hasOwnProperty ,
@@ -2933,7 +2953,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
29332953 __extends = function ( child , parent ) { for ( var key in parent ) { if ( __hasProp . call ( parent , key ) ) child [ key ] = parent [ key ] ; } function ctor ( ) { this . constructor = child ; } ctor . prototype = parent . prototype ; child . prototype = new ctor ( ) ; child . __super__ = parent . prototype ; return child ; } ;
29342954
29352955 angular . module ( "google-maps.directives.api.models.child" . ns ( ) ) . factory ( "WindowChildModel" . ns ( ) , [
2936- "BaseObject" . ns ( ) , "GmapUtil" . ns ( ) , "Logger" . ns ( ) , "$compile" , "$http" , "$templateCache" , function ( BaseObject , GmapUtil , $log , $compile , $http , $templateCache ) {
2956+ "BaseObject" . ns ( ) , "GmapUtil" . ns ( ) , "Logger" . ns ( ) , "$compile" , "$http" , "$templateCache" , 'uiGmapChromeFixes' , function ( BaseObject , GmapUtil , $log , $compile , $http , $templateCache , ChromeFixes ) {
29372957 var WindowChildModel ;
29382958 WindowChildModel = ( function ( _super ) {
29392959 __extends ( WindowChildModel , _super ) ;
@@ -3145,10 +3165,23 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
31453165 } ;
31463166
31473167 WindowChildModel . prototype . showWindow = function ( ) {
3148- var compiled , templateScope ;
3168+ var compiled , show , templateScope ;
31493169 if ( this . gWin != null ) {
3170+ show = ( function ( _this ) {
3171+ return function ( ) {
3172+ return _ . defer ( function ( ) {
3173+ if ( ! _this . gWin . isOpen ( ) ) {
3174+ _this . gWin . open ( _this . mapCtrl , _this . getGmarker ( ) ? _this . getGmarker ( ) : void 0 ) ;
3175+ _this . model . show = _this . gWin . isOpen ( ) ;
3176+ return _ . defer ( function ( ) {
3177+ return ChromeFixes . maybeRepaint ( _this . gWin . content ) ;
3178+ } ) ;
3179+ }
3180+ } ) ;
3181+ } ;
3182+ } ) ( this ) ;
31503183 if ( this . scope . templateUrl ) {
3151- $http . get ( this . scope . templateUrl , {
3184+ return $http . get ( this . scope . templateUrl , {
31523185 cache : $templateCache
31533186 } ) . then ( ( function ( _this ) {
31543187 return function ( content ) {
@@ -3158,7 +3191,8 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
31583191 templateScope . parameter = _this . scope . templateParameter ;
31593192 }
31603193 compiled = $compile ( content . data ) ( templateScope ) ;
3161- return _this . gWin . setContent ( compiled [ 0 ] ) ;
3194+ _this . gWin . setContent ( compiled [ 0 ] ) ;
3195+ return show ( ) ;
31623196 } ;
31633197 } ) ( this ) ) ;
31643198 } else if ( this . scope . template ) {
@@ -3168,10 +3202,9 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
31683202 }
31693203 compiled = $compile ( this . scope . template ) ( templateScope ) ;
31703204 this . gWin . setContent ( compiled [ 0 ] ) ;
3171- }
3172- if ( ! this . gWin . isOpen ( ) ) {
3173- this . gWin . open ( this . mapCtrl , this . getGmarker ( ) ? this . getGmarker ( ) : void 0 ) ;
3174- return this . model . show = this . gWin . isOpen ( ) ;
3205+ return show ( ) ;
3206+ } else {
3207+ return show ( ) ;
31753208 }
31763209 }
31773210 } ;
0 commit comments