Patch: `transitionstart` event does not work well with ionic1
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.3.2-beta-20180516-1804" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.3.2-beta-20180516-1829" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
www/CordovaGoogleMaps.js
www/CordovaGoogleMaps.js
@@ -338,7 +338,7 @@ CordovaGoogleMaps.prototype.putHtmlElements = function() {
//-----------------------------------------------------------------
self.resume();
- //console.log("--->putHtmlElements to native (start)", JSON.parse(JSON.stringify(self.domPositions)));
+ console.log("--->putHtmlElements to native (start)", JSON.parse(JSON.stringify(self.domPositions)));
cordova_exec(function() {
//console.log("--->putHtmlElements to native (done)");

MODIFY
www/googlemaps-cdv-plugin.js
www/googlemaps-cdv-plugin.js
@@ -115,7 +115,7 @@ if (!cordova) {
if (notYetTargets.length === 0) {
clearTimeout(transitionEndTimer);
transitionEndTimer = null;
- onTransitionFinish();
+ setTimeout(onTransitionFinish, 100);
} else {
transitionEndTimer = setTimeout(detectTransitionFinish, 100);
}
@@ -140,8 +140,8 @@ if (!cordova) {
}
}
- document.addEventListener("transitionstart", followMaps);
- document.body.addEventListener("transitionend", onTransitionEnd);
+ document.addEventListener("transitionstart", followMaps, {capture: true});
+ document.body.addEventListener("transitionend", onTransitionEnd, {capture: true});
// document.body.addEventListener("transitionend", function(e) {
// if (!e.target.hasAttribute("__pluginDomId")) {
// return;

Patch: `transitionstart` event does not work well with ionic1 #2252