mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
Restore leading event for move throttling
Hash updates turn out to be very timing sensitive. While it's OK for drag gestures to be throttled with a trailing edge, manual moves such as zooming to a particular feature should always trigger a leading edge update. To recoup the performance, we could refactor the map events to the standard movestart, move, and moveend, and update the hash only on moveend. Fixes #2023
This commit is contained in:
@@ -30,7 +30,7 @@ iD.behavior.Hash = function(context) {
|
||||
if (s0 !== s1) location.replace(s0 = s1); // don't recenter the map!
|
||||
}
|
||||
|
||||
var move = _.throttle(update, 500, {leading: false});
|
||||
var move = _.throttle(update, 500);
|
||||
|
||||
function hashchange() {
|
||||
if (location.hash === s0) return; // ignore spurious hashchange events
|
||||
|
||||
Reference in New Issue
Block a user