Skip to content

Conversation

danzel
Copy link
Member

@danzel danzel commented Aug 30, 2012

Don't repeatedly request and cancel animation frames (previous code wasn't actually canceling the requests anyway!).
Fixes #950

…cancel animation frames (previous code wasn't actually canceling the requests anyway!).
this._updateRequest = L.Util.requestAnimFrame(this._fireMapMoveEnd, this._map);
if (this._map && L.Path._updateRequest === null) {
L.Path._updateRequest = L.Util.requestAnimFrame(this._fireMapMoveEnd, this._map);
console.log('requested ' + L.Path._updateRequest);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot the console.log :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah crap, a beginner mistake :)
Will fix these up on Monday.

@danzel
Copy link
Member Author

danzel commented Sep 2, 2012

Fixed up those issues :)

mourner added a commit that referenced this pull request Sep 11, 2012
Optimize _requestUpdate in Path.Canvas.
@mourner mourner merged commit 1933ae1 into Leaflet:master Sep 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LayerGroup.clearLayers() with canvas hangs the browser
2 participants