Commit 0497371a authored by Sheetal Umesh Kumar's avatar Sheetal Umesh Kumar

Set initial annotation counts to 0 because annotation counters are not updated...

Set initial annotation counts to 0 because annotation counters are not updated if a page has no annotations.
parent 97839e63
...@@ -13,6 +13,8 @@ var ANNOTATION_COUNT_ATTR = 'data-hypothesis-annotation-count'; ...@@ -13,6 +13,8 @@ var ANNOTATION_COUNT_ATTR = 'data-hypothesis-annotation-count';
*/ */
function annotationCounts(rootEl, crossframe) { function annotationCounts(rootEl, crossframe) {
updateAnnotationCountElems(0);
crossframe.on(events.PUBLIC_ANNOTATION_COUNT_CHANGED, updateAnnotationCountElems); crossframe.on(events.PUBLIC_ANNOTATION_COUNT_CHANGED, updateAnnotationCountElems);
function updateAnnotationCountElems(newCount) { function updateAnnotationCountElems(newCount) {
......
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