Skip to content

Commit d912238

Browse files
author
Victor Nazzaro
committed
Making delete function more clear
1 parent a7cb859 commit d912238

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/UI/eraser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function erase(target){
3535
n.parentNode.removeChild(n);
3636
});
3737

38-
PDFJSAnnotate.getStoreAdapter().deleteAnnotation(documentId, annotationId);
38+
PDFJSAnnotate.getStoreAdapter().deleteAnnotation(documentId, userId, annotationId);
3939
}
4040
}
4141
}

src/adapter/StoreAdapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ export default class StoreAdapter {
9999
__deleteAnnotation(documentId, annotationId) { abstractFunction('deleteAnnotation'); }
100100
get deleteAnnotation() { return this.__deleteAnnotation; }
101101
set deleteAnnotation(fn) {
102-
this.__deleteAnnotation = function deleteAnnotation(documentId, annotationId) {
102+
this.__deleteAnnotation = function deleteAnnotation(documentId, userId, annotationId) {
103103
return fn(...arguments).then((success) => {
104104
if (success) {
105-
fireEvent('annotation:delete', documentId, annotationId);
105+
fireEvent('annotation:delete', documentId, userId, annotationId);
106106
}
107107
return success;
108108
});

web/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import initColorPicker from './shared/initColorPicker';
44

55
const { UI } = PDFJSAnnotate;
66
const documentId = 'example.pdf';
7-
const userId = 'instructor';
7+
const userId = 'aphacker';
88
let PAGE_HEIGHT;
99
let RENDER_OPTIONS = {
1010
documentId,

0 commit comments

Comments
 (0)