Skip to content

Commit

Permalink
Merge pull request #425 from d-i-t-a/bugfix/edit-toolbox-items
Browse files Browse the repository at this point in the history
updated toolbox items
  • Loading branch information
aferditamuriqi authored Jan 17, 2023
2 parents cbf7a9e + b30ceca commit 3f7ffb8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ settings.json
yarn.lock
.parcel-cache
parcel-dist
examples/epubs_
examples/epubs__
examples/epubs___
examples/epubs____
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@d-i-t-a/reader",
"version": "2.1.8",
"version": "2.1.9",
"description": "A viewer application for EPUB files.",
"repository": "https://github.com/d-i-t-a/R2D2BC",
"license": "Apache-2.0",
Expand Down
24 changes: 0 additions & 24 deletions src/modules/highlight/TextHighlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3248,22 +3248,6 @@ export class TextHighlighter {
if (highlightIcon) {
highlightIcon.style.display = "none";
}
function noteH() {
// notes adding by clicking on gutter icon
self.delegate.annotationModule?.api
?.addCommentToAnnotation(anno)
.then((result) => {
self.delegate.annotationModule
?.updateAnnotation(result)
.then(async () => {
log.log("update highlight " + result.id);
toolbox!!.style.display = "none";
self.selectionMenuClosed();
});
toolbox!!.style.display = "none";
self.selectionMenuClosed();
});
}

let commentIcon = document.getElementById("commentIcon");
let cloneCommentIcon = document.getElementById("cloneCommentIcon");
Expand All @@ -3275,14 +3259,6 @@ export class TextHighlighter {
}
if (commentIcon) {
commentIcon.style.display = "none";
let clone = commentIcon.cloneNode(true) as HTMLButtonElement;
let parent = commentIcon.parentElement;
clone.style.display = "unset";
clone.id = "cloneCommentIcon";
clone.addEventListener("click", noteH, false);
if (parent) {
parent.append(clone);
}
}

function deleteH() {
Expand Down

0 comments on commit 3f7ffb8

Please sign in to comment.