change the callback from resuming from idle, so it starts a short refresh timeout as if the map had just moved
this way, if you switch back to IITC, then quickly move/zoom (as often is done), unnecessary network requests are avoided because of the change, there's no need for chat to have it's own resume hook - it already hooks into the refresh code and this is now triggered quickly
This commit is contained in:
@ -198,7 +198,7 @@ window.setupMap = function() {
|
||||
map.on('movestart zoomstart', function() { window.mapRunsUserAction = true; window.requests.abort(); window.startRefreshTimeout(-1); });
|
||||
map.on('moveend zoomend', function() { window.mapRunsUserAction = false; window.startRefreshTimeout(ON_MOVE_REFRESH*1000); });
|
||||
|
||||
window.addResumeFunction(window.requestData);
|
||||
window.addResumeFunction(function() { window.startRefreshTimeout(ON_MOVE_REFRESH*1000); });
|
||||
window.requests.addRefreshFunction(window.requestData);
|
||||
|
||||
// start the refresh process with a small timeout, so the first data request happens quickly
|
||||
|
Reference in New Issue
Block a user