Skip to content

Commit 26c129e

Browse files
author
Victor Nazzaro
committed
more stuff
1 parent 6e62f23 commit 26c129e

File tree

7 files changed

+83
-19
lines changed

7 files changed

+83
-19
lines changed

dist/pdf-annotate.js

Lines changed: 62 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UI/eraser.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,19 @@ function handleDocumentMouseUp(e){
1717
function handleDocumentMouseMove(e){
1818
if(_canerase){
1919
let target = findAnnotationAtPoint(e.clientX, e.clientY);
20-
console.log(target);
20+
if(target){
21+
console.log(target);
22+
let annotationId = target.getAttribute('data-pdf-annotate-id');
23+
// let nodes = document.querySelectorAll(`[data-pdf-annotate-id="${annotationId}"]`);
24+
// let svg = overlay.parentNode.querySelector(config.annotationSvgQuery());
25+
// let { documentId } = getMetadata(svg);
26+
27+
// [...nodes].forEach((n) => {
28+
// n.parentNode.removeChild(n);
29+
// });
30+
31+
// PDFJSAnnotate.getStoreAdapter().deleteAnnotation(documentId, annotationId);
32+
}
2133
}
2234
}
2335

src/UI/pen.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ function handleDocumentPointermove(e) {
7171
}
7272

7373
function handleDocumentPointermoveChrome(e){
74-
savePoint(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
74+
if(_candraw){
75+
savePoint(e.changedTouches[0].clientX, e.changedTouches[0].clientY);
76+
}
7577
}
7678

7779
/**

src/UI/text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function handleDocumentMouseup(e) {
3131
input.style.top = `${e.clientY}px`;
3232
input.style.left = `${e.clientX}px`;
3333
input.style.fontSize = `${_textSize}px`;
34-
input.style.zIndex = "41px";
34+
input.style.zIndex = "41";
3535
input.addEventListener('blur', handleInputBlur);
3636
input.addEventListener('keyup', handleInputKeyup);
3737

0 commit comments

Comments
 (0)