mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-28 19:01:31 +02:00
Don't debounce loadTiles inside connection
It doesn't look like this is needed -- loadTiles is called only from redraws, which are already debounced. And external debouncing is the right way to do it.
This commit is contained in:
+2
-4
@@ -248,7 +248,7 @@ iD.Connection = function(context) {
|
||||
bboxFromAPI(e.box, e.tile, done);
|
||||
}
|
||||
|
||||
function loadTiles(projection, dimensions) {
|
||||
connection.loadTiles = function(projection, dimensions) {
|
||||
var scaleExtent = [16, 16],
|
||||
s = projection.scale(),
|
||||
tiles = d3.geo.tile()
|
||||
@@ -286,7 +286,7 @@ iD.Connection = function(context) {
|
||||
.filter(tileAlreadyLoaded)
|
||||
.map(apiExtentBox)
|
||||
.forEach(loadTile);
|
||||
}
|
||||
};
|
||||
|
||||
connection.userUrl = function(username) {
|
||||
return url + "/user/" + username;
|
||||
@@ -335,7 +335,5 @@ iD.Connection = function(context) {
|
||||
return oauth.authenticate(done);
|
||||
};
|
||||
|
||||
connection.loadTiles = _.debounce(loadTiles, 100);
|
||||
|
||||
return d3.rebind(connection, event, 'on');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user