Commit 64004257 authored by gergely-ujvari's avatar gergely-ujvari

Merge pull request #2120 from hypothesis/bump-initial-load-count

Bump the number of annotations loaded per request to 200
parents b10d7900 56c6c080
...@@ -75,6 +75,7 @@ describe 'WidgetController', -> ...@@ -75,6 +75,7 @@ describe 'WidgetController', ->
describe 'loadAnnotations', -> describe 'loadAnnotations', ->
it 'loads all annotation for a provider', -> it 'loads all annotation for a provider', ->
viewer.chunkSize = 20
fakeCrossFrame.providers.push {entities: ['http://example.com']} fakeCrossFrame.providers.push {entities: ['http://example.com']}
$scope.$digest() $scope.$digest()
loadSpy = fakeAnnotationMapper.loadAnnotations loadSpy = fakeAnnotationMapper.loadAnnotations
......
...@@ -14,11 +14,12 @@ module.exports = class WidgetController ...@@ -14,11 +14,12 @@ module.exports = class WidgetController
$scope.isEmbedded = true $scope.isEmbedded = true
$scope.isStream = true $scope.isStream = true
@chunkSize = 200
loaded = [] loaded = []
_loadAnnotationsFrom = (query, offset) -> _loadAnnotationsFrom = (query, offset) =>
queryCore = queryCore =
limit: 20 limit: @chunkSize
offset: offset offset: offset
sort: 'created' sort: 'created'
order: 'asc' order: 'asc'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment