1DV.Schema.events.ViewAnnotation = { 2 next: function(e){ 3 var viewer = this.viewer; 4 var activeAnnotationId = viewer.activeAnnotationId; 5 var annotationsModel = this.models.annotations; 6 var nextAnnotation = (activeAnnotationId === null) ? 7 annotationsModel.getFirstAnnotation() : annotationsModel.getNextAnnotation(activeAnnotationId); 8 9 if (!nextAnnotation){ 10 return false; 11 } 12 13 viewer.pageSet.showAnnotation(nextAnnotation); 14 this.helpers.setAnnotationPosition(nextAnnotation.position); 15 16 17 }, 18 previous: function(e){ 19 var viewer = this.viewer; 20 var activeAnnotationId = viewer.activeAnnotationId; 21 var annotationsModel = this.models.annotations; 22 23 var previousAnnotation = (!activeAnnotationId) ? 24 annotationsModel.getFirstAnnotation() : annotationsModel.getPreviousAnnotation(activeAnnotationId); 25 if (!previousAnnotation){ 26 return false; 27 } 28 29 viewer.pageSet.showAnnotation(previousAnnotation); 30 this.helpers.setAnnotationPosition(previousAnnotation.position); 31 32 33 }, 34 search: function(e){ 35 e.preventDefault(); 36 this.viewer.open('ViewSearch'); 37 38 return false; 39 } 40};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.