explorejs
explorejs copied to clipboard
Cancel request for particular cache range for views
As a view, when I change viewport range to other, I want to report to RequestManager that I do not longer need such ranges, so RequestManager can remove them from queue. Thanks to that in case of fast paning/zooming we avoid to load data which won't be displayed due to fast range change.
additional function: smart batched request abortion if released range belongs to pending batch request, it should abort the request if there are no more ranges in batch request. if there is something different in request, consider aborting and re-requesting remaining ranges
implementation details: keep requested ranges with ref counters
request(range) {
current_range.counter = 1
result = current_range AND new range { cmpFn: a.levelId, a.counter}
for range in result.resized: range.counter++
}