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:
John Firebaugh
2013-03-01 11:54:27 -08:00
parent cf4e022cc2
commit 78f0d36c02
+2 -4
View File
@@ -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');
};