Permalink
Browse files

update build

  • Loading branch information...
1 parent 5afbfa8 commit b2140e8d3135ff1fcf063d552d124ee1fd1ae4ee @mourner mourner committed Jul 4, 2012
Showing with 18 additions and 1 deletion.
  1. +17 −0 dist/leaflet-src.js
  2. +1 −1 dist/leaflet.js
View
17 dist/leaflet-src.js
@@ -6353,6 +6353,11 @@ L.Transition = L.Transition.extend({
this.fire('start');
+ if (L.Browser.mobileWebkit) {
+ // Set up a slightly delayed call to a backup event if webkitTransitionEnd doesn't fire properly
+ this.backupEventFire = setTimeout(L.Util.bind(this._onBackupFireEnd, this), this.options.duration * 1.2 * 1000);
+ }
+
if (L.Transition.NATIVE) {
clearInterval(this._timer);
this._timer = setInterval(this._onFakeStep, this.options.fakeStepInterval);
@@ -6384,12 +6389,24 @@ L.Transition = L.Transition.extend({
this._el.style[L.Transition.TRANSITION] = '';
+ // Clear the delayed call to the backup event, we have recieved some form of webkitTransitionEnd
+ clearTimeout(this.backupEventFire);
+ delete this.backupEventFire;
+
this.fire('step');
if (e && e.type) {
this.fire('end');
}
}
+ },
+
+ _onBackupFireEnd: function () {
+ // Create and fire a transitionEnd event on the element.
+
+ var event = document.createEvent("Event");
+ event.initEvent(L.Transition.END, true, false);
+ this._el.dispatchEvent(event);
}
});
View
2 dist/leaflet.js
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit b2140e8

Please sign in to comment.