Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable animations outside dom #1856

Merged
merged 4 commits into from
Jul 11, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Stop transition if element is outside fo the DOM
  • Loading branch information
Aaron Rutkovsky committed Jul 3, 2013
commit f01e010f9aa21f601106635d3166586d63e73530
4 changes: 4 additions & 0 deletions src/dom/PosAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ L.PosAnimation = L.Class.extend({
},

_onStep: function () {
if (!document.documentElement.contains(this._el)) {
this._onTransitionEnd();
return;
}
// jshint camelcase: false
// make L.DomUtil.getPosition return intermediate position value during animation
this._el._leaflet_pos = this._getPos();
Expand Down