@@ -703,7 +703,7 @@ App.prototype.setDiv = function(div) {
703703 }
704704 if ( currentDiv . classList ) {
705705 currentDiv . classList . remove ( '_gmaps_cdv_' ) ;
706- } else if ( div . className ) {
706+ } else if ( currentDiv . className ) {
707707 currentDiv . className = currentDiv . className . replace ( / _ g m a p s _ c d v _ / g, "" ) ;
708708 currentDiv . className = currentDiv . className . replace ( / \s + / g, " " ) ;
709709 }
@@ -1031,21 +1031,16 @@ App.prototype.addGroundOverlay = function(groundOverlayOptions, callback) {
10311031 groundOverlayOptions . zIndex = groundOverlayOptions . zIndex || 1 ;
10321032 groundOverlayOptions . bounds = groundOverlayOptions . bounds || [ ] ;
10331033
1034- var pluginExec = function ( ) {
1035- cordova . exec ( function ( result ) {
1036- var groundOverlay = new GroundOverlay ( self , result . id , groundOverlayOptions ) ;
1037- OVERLAYS [ result . id ] = groundOverlay ;
1038- if ( typeof groundOverlayOptions . onClick === "function" ) {
1039- groundOverlay . on ( plugin . google . maps . event . OVERLAY_CLICK , groundOverlayOptions . onClick ) ;
1040- }
1041- if ( typeof callback === "function" ) {
1042- callback . call ( self , groundOverlay , self ) ;
1043- }
1044- } , self . errorHandler , PLUGIN_NAME , 'exec' , [ 'GroundOverlay.createGroundOverlay' , groundOverlayOptions ] ) ;
1045- } ;
1046-
1047- pluginExec ( ) ;
1048-
1034+ cordova . exec ( function ( result ) {
1035+ var groundOverlay = new GroundOverlay ( self , result . id , groundOverlayOptions ) ;
1036+ OVERLAYS [ result . id ] = groundOverlay ;
1037+ if ( typeof groundOverlayOptions . onClick === "function" ) {
1038+ groundOverlay . on ( plugin . google . maps . event . OVERLAY_CLICK , groundOverlayOptions . onClick ) ;
1039+ }
1040+ if ( typeof callback === "function" ) {
1041+ callback . call ( self , groundOverlay , self ) ;
1042+ }
1043+ } , self . errorHandler , PLUGIN_NAME , 'exec' , [ 'GroundOverlay.createGroundOverlay' , groundOverlayOptions ] ) ;
10491044
10501045} ;
10511046
@@ -1696,7 +1691,7 @@ var GroundOverlay = function(map, groundOverlayId, groundOverlayOptions) {
16961691
16971692 var self = this ;
16981693 groundOverlayOptions . visible = groundOverlayOptions . visible === undefined ? true : groundOverlayOptions . visible ;
1699- groundOverlayOptions . zIndex = groundOverlayOptions . zIndex || 0 ;
1694+ groundOverlayOptions . zIndex = groundOverlayOptions . zIndex || 1 ;
17001695 groundOverlayOptions . opacity = groundOverlayOptions . opacity || 1 ;
17011696 groundOverlayOptions . bounds = groundOverlayOptions . bounds || [ ] ;
17021697 groundOverlayOptions . anchor = groundOverlayOptions . anchor || [ 0 , 0 ] ;
@@ -1929,8 +1924,8 @@ function isHTMLColorString(inputValue) {
19291924 inputValue . match ( / ^ # [ 0 - 9 A - F ] { 4 } $ / i) ||
19301925 inputValue . match ( / ^ # [ 0 - 9 A - F ] { 6 } $ / i) ||
19311926 inputValue . match ( / ^ # [ 0 - 9 A - F ] { 8 } $ / i) ||
1932- inputValue . match ( / ^ r g b a \( [ \d , . \s ] + \) $ / ) ||
1933- inputValue . match ( / ^ h s l a \( [ \d % , . \s ] + \) $ / ) ) {
1927+ inputValue . match ( / ^ r g b a ? \( [ \d , . \s ] + \) $ / ) ||
1928+ inputValue . match ( / ^ h s l a ? \( [ \d % , . \s ] + \) $ / ) ) {
19341929 return true ;
19351930 }
19361931
0 commit comments